Unverified Commit b6a541b4 authored by javaht's avatar javaht Committed by GitHub

fix one table hava two or more primary key (#2209)

parent c8143978
...@@ -59,7 +59,7 @@ public class PostgreSqlQuery extends AbstractDBQuery { ...@@ -59,7 +59,7 @@ public class PostgreSqlQuery extends AbstractDBQuery {
+ " , 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" + " , (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" + " = ANY(PC.conkey) AND PC.contype = 'p' and PC.conrelid = c.oid) > 0 \n"
+ "THEN 'PRI' ELSE '' END) AS key\n" + "THEN 'PRI' 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"
......
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