Re: restore/dup OIDs HELP!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jack Flak <jack(at)flak(dot)nospam(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: restore/dup OIDs HELP!
Date: 2003-01-06 19:56:54
Message-ID: 25509.1041883014@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jack Flak <jack(at)flak(dot)nospam(dot)org> writes:
> So, once again, here's my question: how do I go about deleting the
> duplicate entries WITHOUT also deleting the originals?

Perhaps something like

CREATE TABLE foo AS SELECT DISTINCT * FROM original;

then delete all from original, then INSERT INTO original SELECT * FROM foo;

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Treat 2003-01-06 20:23:52 Re: Vacuum explained
Previous Message Stephan Szabo 2003-01-06 18:42:18 Re: restore/dup OIDs HELP!