Re: DEFERRABLE and DEFERRED - Mailing list pgsql-general

From Stephan Szabo
Subject Re: DEFERRABLE and DEFERRED
Date
Msg-id 20020605070358.R13828-100000@megazone23.bigpanda.com
Whole thread Raw
In response to DEFERRABLE and DEFERRED  (Adrian 'Dagurashibanipal' von Bidder <avbidder@fortytwo.ch>)
List pgsql-general
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).


pgsql-general by date:

Previous
From: "Joshua b. Jore"
Date:
Subject: Insight into indexes? (or inverting then externally)
Next
From: Joseph Maxwell
Date:
Subject: Re: How do I get a Digest subscription?