New answers tagged postgresql-11
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';
-- ...
Community wiki
Top 50 recent answers are included
Related Tags
postgresql-11 × 234postgresql × 208
performance × 21
postgresql-performance × 21
query-performance × 15
index × 13
execution-plan × 10
partitioning × 10
amazon-rds × 10
json × 10
replication × 9
postgresql-10 × 8
backup × 6
optimization × 6
select × 6
functions × 6
master-slave-replication × 6
database-design × 5
array × 5
postgresql-9.6 × 4
plpgsql × 4
pg-dump × 4
stored-procedures × 3
configuration × 3
aggregate × 3