Igor Korot <ikorot01@xxxxxxxxx> writes: > Is there a reason I'm seeing duplicate records on the query above? Your example isn't complete, but I think the problem is your WHERE clause isn't equating enough columns. For instance, if I do db=# create table pp(f1 int, f2 int, primary key (f1,f2)); CREATE TABLE that produces two rows in information_schema.key_column_usage: db | public | pp_pkey | db | public | pp | f1 | 1 | db | public | pp_pkey | db | public | pp | f2 | 2 | Your WHERE clause can't tell the difference between these. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general