On 5 Jun 2002, Adrian 'Dagurashibanipal' von Bidder wrote:
> It seems not possible to defer anything other than FOREIGN KEY
> constraints. Is this true, and are there reasons for this?
Yes and because noone's done it yet. :)
Seriously, it's generally less important for not null, unique and primary
key. I'd expect check constraints to get it first.
> What we want to do fill a record step by step, leaving some NOT NULL
> columns empty in the first place and later in the transaction UPDATEing
> them to contain some values. Collecting the values first would be
> impractical as the update statements are somewhat scattered over various
> modules of the program.
You could probably write trigger functions that you could use with
create constraint trigger that would let you defer the check. You'd have
to make sure that the row you were given is still valid (do nothing if
it is not).