提交 32d1d311 编写于 作者: S Serge Rider

#12 PostgreSQL class cache

上级 b9816c62
......@@ -299,12 +299,19 @@ public class PostgreSchema implements DBSSchema, DBPSaveableObject, DBPRefreshab
throws SQLException
{
StringBuilder sql = new StringBuilder();
sql.append("SELECT c.relname,a.* FROM pg_catalog.pg_attribute a,pg_catalog.pg_class c WHERE a.attrelid=c.oid AND c.oid=?");
sql.append("SELECT c.relname,a.* FROM pg_catalog.pg_attribute a,pg_catalog.pg_class c WHERE a.attrelid=c.oid");
if (forTable != null) {
sql.append(" AND c.oid=?");
} else {
sql.append(" AND c.relnamespace=?");
}
sql.append(" ORDER BY a.attnum");
JDBCPreparedStatement dbStat = session.prepareStatement(sql.toString());
if (forTable != null) {
dbStat.setInt(1, forTable.getObjectId());
} else {
dbStat.setInt(1, PostgreSchema.this.getObjectId());
}
return dbStat;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册