Re: duplicate rows mystery - Mailing list pgsql-novice

From Tom Lane
Subject Re: duplicate rows mystery
Date
Msg-id 498.1113489987@sss.pgh.pa.us
Whole thread Raw
In response to duplicate rows mystery  (Gerry Jensen <gerry@xmission.com>)
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: duplicate rows mystery
Next
From: Leung Wing Lap Ellery
Date:
Subject: Re: Problems on "copy" statement