提交 b3525da0 authored 作者: ebocher's avatar ebocher

Workaround for PostgreSQL to avoid index names

上级 c554e2e9
......@@ -52,7 +52,13 @@ public class LinkSchema {
stat = conn.createStatement();
stat.execute("CREATE SCHEMA IF NOT EXISTS " +
StringUtils.quoteIdentifier(targetSchema));
//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()) {
String table = rs.getString("TABLE_NAME");
StringBuilder buff = new StringBuilder();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论