Re: Initially deferred constraints
Date: Mon, 08 Jun 2009 23:24:48 +0200
On 08.06.2009 21:42, DeanB wrote:
> On Jun 8, 2:38 pm, DeanB <deanbrow..._at_yahoo.com> wrote:
>> On Jun 8, 12:35 pm, ddf <orat..._at_msn.com> wrote: >>> On Jun 8, 10:16 am, dean <deanbrow..._at_yahoo.com> 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:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/data_int.htm#sthref3150 http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/data_int.htm#i7039 http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/data_int.htm#i4011
-- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/Received on Mon Jun 08 2009 - 16:24:48 CDT