Hey 👋
The not valid constraint clause allows to create check constraints that enforce correctness of future data only (inserts or updates), allowing to safely backfill a column and then validate the constraint (doesn't block reads/writes) AND set not null with way less locking given the constraint is now valid.
Hey 👋
The
not validconstraint clause allows to create check constraints that enforce correctness of future data only (inserts or updates), allowing to safely backfill a column and then validate the constraint (doesn't block reads/writes) ANDset not nullwith way less locking given the constraint is now valid.