Re: Delete 1 Record of 2 Duplicate Records - Mailing list pgsql-sql

From greg@turnstep.com
Subject Re: Delete 1 Record of 2 Duplicate Records
Date
Msg-id 07f0833692070125b9317094e7008b4f@biglumber.com
Whole thread Raw
In response to Delete 1 Record of 2 Duplicate Records  (val@webtribe.net)
Responses Re: Delete 1 Record of 2 Duplicate Records  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


If they are truly identical, then you must use the hidden 'oid' column to 
differentiate the two. No need to peek at the oid, just do this:

DELETE FROM test WHERE oid = (SELECT oid FROM test WHERE column_id=5 LIMIT 1);

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200301301006

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE+OT+AvJuQZxSWSsgRAgZOAKCrwW2O/bQpxo5LBBp4vDkS8YoZ9wCg2H7N
R9R4CTSXx/lRmjm5NvZkYXE=
=VI0G
-----END PGP SIGNATURE-----



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Filter function
Next
From: "Tambet Matiisen"
Date:
Subject: Re: Function executing twice