Assuming you want to remove duplicates and keep the original, the accepted answer is inaccurate - it will also delete your originals and save records that have one record from the very beginning. This works on 9.x:
SELECT * FROM tblname WHERE ctid IN (SELECT ctid FROM (SELECT ctid, ROW_NUMBER() OVER (partition BY col1, col2, col3 ORDER BY ctid) AS rnum FROM tblname) t WHERE t.rnum > 1);
https://wiki.postgresql.org/wiki/Deleting_duplicates
source share