Re: OID's - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: OID's
Date
Msg-id BF7F90C6-37C4-11D9-BBF2-000A95C88220@myrealbox.com
Whole thread Raw
In response to Re: OID's  (Holger Klawitter <lists@klawitter.de>)
List 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


pgsql-general by date:

Previous
From: Holger Klawitter
Date:
Subject: Re: OID's
Next
From: Tatsuo Ishii
Date:
Subject: Re: OID's