New answers tagged

2 votes
Accepted

How to swap primary key between records in postgres

Solution for bulk updates for numeric primary keys, thanks to input from the authors of other answers: -- disable foreign key constraint validation BEGIN; SET session_replication_role='replica'; -- ...

Top 50 recent answers are included