Search Postgresql Archives

Re: Why am I getting doubles?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux