提交 782069ef authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #510 from ebocher/link_schema_issue

Fix link_schema
...@@ -52,7 +52,12 @@ public class LinkSchema { ...@@ -52,7 +52,12 @@ public class LinkSchema {
stat = conn.createStatement(); stat = conn.createStatement();
stat.execute("CREATE SCHEMA IF NOT EXISTS " + stat.execute("CREATE SCHEMA IF NOT EXISTS " +
StringUtils.quoteIdentifier(targetSchema)); StringUtils.quoteIdentifier(targetSchema));
rs = c2.getMetaData().getTables(null, sourceSchema, null, null); //Workaround for PostgreSQL to avoid index names
if (url.startsWith("jdbc:postgresql:")) {
rs = c2.getMetaData().getTables(null, sourceSchema, null, new String[]{"TABLE", "LINKED TABLE", "VIEW", "EXTERNAL"});
} else {
rs = c2.getMetaData().getTables(null, sourceSchema, null, null);
}
while (rs.next()) { while (rs.next()) {
String table = rs.getString("TABLE_NAME"); String table = rs.getString("TABLE_NAME");
StringBuilder buff = new StringBuilder(); StringBuilder buff = new StringBuilder();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论