Unverified Commit 7e48aae6 authored by javaht's avatar javaht Committed by GitHub

fix postgres schema (#1857)

* fix postgres schema error * fix postgres schema * fix postgres schema * fix postgres schema --------- Co-authored-by: 's avataraiwenmo <32723967+aiwenmo@users.noreply.github.com>
parent d364c438
...@@ -57,10 +57,8 @@ public class PostgreSqlQuery extends AbstractDBQuery { ...@@ -57,10 +57,8 @@ public class PostgreSqlQuery extends AbstractDBQuery {
+ " , col.numeric_scale as numeric_scale\n" + " , col.numeric_scale as numeric_scale\n"
+ " , col.ordinal_position as ordinal_position\n" + " , col.ordinal_position as ordinal_position\n"
+ " , col.udt_name as type\n" + " , col.udt_name as type\n"
+ " , (CASE WHEN (SELECT COUNT(*) FROM pg_constraint AS PC WHERE b.attnum = PC.conkey[1] AND PC.contype = 'p' and PC.conname ='" + " , (CASE WHEN (SELECT COUNT(*) FROM pg_constraint AS PC WHERE b.attnum = PC.conkey[1] AND PC.contype = 'p' and PC.conrelid = c.oid) > 0 \n"
+ tableName + "THEN 'PRI' ELSE '' END) AS key\n"
+ "'||'_pkey') > 0 THEN 'PRI' \n"
+ " ELSE '' END) AS key\n"
+ " , col_description(c.oid, col.ordinal_position) AS comment\n" + " , col_description(c.oid, col.ordinal_position) AS comment\n"
+ " , col.column_default AS column_default\n" + " , col.column_default AS column_default\n"
+ "FROM information_schema.columns AS col\n" + "FROM information_schema.columns AS col\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment