Hacker News new | ask | show | jobs
by petereisentraut 1112 days ago
> - Support for deferring NOT NULL and CHECK constraints to the end of a transaction (just ran into this problem yesterday)

I'm curious what the use case of this is?

Deferrable constraints are usually considered for foreign keys, since there you might have to juggle updates to multiple tables and might violate the constraint in the intermediate states. But that doesn't appear to apply in that way to CHECK constraints.

1 comments

2 tables that reference each other and the foreign key columns both have a NOT NULL constraint.