|
@@ -61,10 +61,9 @@ public enum QuerySQL {
|
|
|
|
|
|
POSTGRE_SQL("postgre_sql", "select tablename from pg_tables where schemaname='%s' ORDER BY tablename",
|
|
|
"SELECT A.tablename, obj_description(relfilenode, 'pg_class') AS comments FROM pg_tables A, pg_class B WHERE A.schemaname='%s' AND A.tablename = B.relname",
|
|
|
- "SELECT A.name,A.type,A.comment, (CASE C.contype WHEN 'p' THEN 'PRI' ELSE '' END) AS key FROM " +
|
|
|
- "(SELECT attnum,attrelid,attname AS name, format_type(atttypid, atttypmod) AS type,col_description(attrelid, attnum) AS comment " +
|
|
|
- "FROM pg_attribute WHERE attrelid = '%s.%s'::regclass AND attnum > 0 AND NOT attisdropped " +
|
|
|
- "ORDER BY attnum) A LEFT JOIN pg_constraint C ON A.attnum = C.conkey[1] AND A.attrelid = C.conrelid",
|
|
|
+ "SELECT A.attname AS name, format_type(A.atttypid, A.atttypmod) AS type,col_description(A.attrelid, A.attnum) AS comment, (CASE C.contype WHEN 'p' THEN 'PRI' ELSE '' END) AS key " +
|
|
|
+ "FROM pg_attribute A LEFT JOIN pg_constraint C ON A.attnum = C.conkey[1] AND A.attrelid = C.conrelid " +
|
|
|
+ "WHERE A.attrelid = '%s.%s'::regclass AND A.attnum > 0 AND NOT A.attisdropped ORDER BY A.attnum",
|
|
|
"tablename", "comments", "name", "type", "comment", "key");
|
|
|
|
|
|
private final String dbType;
|