Re: duplicate rows mystery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gerry Jensen <gerry(at)xmission(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: duplicate rows mystery
Date: 2005-04-14 14:46:27
Message-ID: 498.1113489987@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Gerry Jensen <gerry(at)xmission(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Leung Wing Lap Ellery 2005-04-14 14:50:02 Re: Problems on "copy" statement
Previous Message Michael Fuhr 2005-04-14 14:24:33 Re: duplicate rows mystery