Re: [GENERAL] Why am I getting doubles?
| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] Why am I getting doubles? |
| Дата | |
| Msg-id | 25395.1501214986@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | [GENERAL] Why am I getting doubles? (Igor Korot <ikorot01@gmail.com>) |
| Список | pgsql-general |
Igor Korot <ikorot01@gmail.com> 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
В списке pgsql-general по дате отправления: