Skip to content
Permalink
Browse files

Detect columns from PG table keys only in current schema, do not mix …

…these with columns from an equally named table in a different schema. Closes #842
  • Loading branch information
ansgarbecker committed Jan 21, 2020
1 parent 638f093 commit 6f3911b3a3e44d911d82d92e866f813d8a66cd57
Showing with 1 addition and 0 deletions.
  1. +1 −0 source/dbconnection.pas
@@ -4853,6 +4853,7 @@ function TPGConnection.GetTableKeys(Table: TDBObject): TTableKeyList;
' FROM pg_class'+
' JOIN pg_index i ON (pg_class.oid = i.indexrelid)'+
' JOIN ndx_list ON (pg_class.oid = ndx_list.indexrelid)'+
' WHERE pg_table_is_visible(pg_class.oid)'+
' )'+
'SELECT ndx_cols.relname AS CONSTRAINT_NAME, ndx_cols.CONSTRAINT_TYPE, a.attname AS COLUMN_NAME '+
'FROM pg_attribute a '+

0 comments on commit 6f3911b

Please sign in to comment.
You can’t perform that action at this time.