| From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
|---|---|
| To: | Holger Klawitter <lists(at)klawitter(dot)de> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: OID's |
| Date: | 2004-11-16 11:43:35 |
| Message-ID: | BF7F90C6-37C4-11D9-BBF2-000A95C88220@myrealbox.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Nov 16, 2004, at 8:32 PM, Holger Klawitter wrote:
> A little bit OT, but:
> is there a way of removing duplicate rows in a table without OIDs?
One method that I believe works (haven't tried it in a while):
BEGIN;
CREATE TEMP TABLE foo_temp AS
SELECT DISTINCT bar, bat, baz
FROM foo;
TRUNCATE foo;
INSERT INTO TABLE foo (bar, bat, baz)
SELECT bar, bat, baz
FROM foo_temp;
DROP TABLE foo_temp;
COMMIT;
There are others. Googling would probably reveal some.
Michael Glaesemann
grzm myrealbox com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2004-11-16 12:20:46 | Re: OID's |
| Previous Message | Holger Klawitter | 2004-11-16 11:32:07 | Re: OID's |