On Oct 18, 2006, at 2:23 PM, Thomas J Keller wrote:
> Greetings,
> Is it appropriate to ask an operational question - not necessarily
> unique to postgresql?
>
> I inserted a few hundred records into a new database table and
> discovered that several where duplicates.
> How does one select these (so they can be deleted)?
You could create a temporary table, SELECT DISTINCT from your problem
table, drop the original table, and then move your temp table data into
the original table.
If your primary key has duplicates, you'll need to make your temporary
table a little different than your original table.
-selena