Re: duplicate rows mystery

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: duplicate rows mystery
Дата
Msg-id 498.1113489987@sss.pgh.pa.us
обсуждение исходный текст
Ответ на duplicate rows mystery  (Gerry Jensen <gerry@xmission.com>)
Список pgsql-novice
Gerry Jensen <gerry@xmission.com> writes:
> I issued the following command[s]:
> select distinct on (symbol, date) * into price from pricebackup;
> create unique index price_symbol_date on pricebackup (symbol, date);
> and got the error:
> ERROR:  could not create unique index
> DETAIL:  Table contains duplicated values.

Um, isn't pricebackup the one that still has the dup rows?  You should
have created the index on the new table.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: duplicate rows mystery
Следующее
От: Leung Wing Lap Ellery
Дата:
Сообщение: Re: Problems on "copy" statement