建表并插入数据
create table test(id int, name varchar);
insert into test values(1,'a'),(1,'a'),(2,'b');
select * from test;
结果:

select ctid,* from test;
结果:

delete from test where ctid not in (select min(ctid) from test group by id);
select ctid,* from test;
