New answers tagged

0 votes
Accepted

In Postgres, duplicate rows on a column are not detected by select group by, but unique index built is failing with duplicate values

Because it uses a corrupted index. Try SET enable_indexscan = off; SET enable_bitmapscan = off; SELECT count(*), username FROM users GROUP BY username HAVING count(*)>=2; That way, you ...
Laurenz Albe's user avatar
  • 51.6k

Top 50 recent answers are included