Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Modern SQL in PostgreSQL. Parent comment
SET CONSTRAINTS ALL DEFERRED
Then do your inserts, followed by whatever work needs to be done without referential integrity, in the same transaction.
There are no comments on this comment yet.
SET CONSTRAINTS ALL DEFERRED
Then do your inserts, followed by whatever work needs to be done without referential integrity, in the same transaction.