Re: Initially deferred constraints

From: Robert Klemme <>
Date: Mon, 08 Jun 2009 23:24:48 +0200
Message-ID: <>

On 08.06.2009 21:42, DeanB wrote:
> On Jun 8, 2:38 pm, DeanB <> wrote:
>> On Jun 8, 12:35 pm, ddf <> wrote:
>>> On Jun 8, 10:16 am, dean <> wrote:
>>>> Can anyone explain to me when a constraint can be deferred, but not
>>>> initially deferred? My understanding is that initially deferred does
>>>> not do its check until the close of a transaction, but I am not sure
>>>> what NOT initially deferred means.

DEFERRABLE INITIALLY IMMEDIATE basically means that the constraint may be deferred but is not at the moment.

> This statement:
> set constraints all deferred;
> alters all constraints that are deferrable (whether they are immediate
> or not) to be deferred until the transaction is committed. However, if
> a check is NOT defined as deferrable, then that check is not deferred
> with the statement above, and the check can never temporarily be
> allowed to fail.
> The set constraints statement is reset on either commit or rollback of
> the transaction.

There are other ways of changing this as well:

Kind regards


remember.guy do |as, often| as.you_can - without end
Received on Mon Jun 08 2009 - 16:24:48 CDT

Original text of this message