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


---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to