Home » RDBMS Server » Server Administration » Constraints
Constraints [message #184573] Thu, 27 July 2006 02:16 Go to next message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
Hey all,

Can anybody tell me the difference between constraints specified as NOT DEFERRABLE and Constraints specified by DEFERRABLE INITIALLY IMMEDIATE.

Thanks and Regards
Yasir Hashmi
Re: Constraints [message #184591 is a reply to message #184573] Thu, 27 July 2006 03:07 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Follow links provided in this thread.
Re: Constraints [message #184648 is a reply to message #184591] Thu, 27 July 2006 06:03 Go to previous messageGo to next message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
Not Deferrable means constraint check immediately after every DML.
Deferred Initially Immediate means constraint check immediately after DML.
What is the defference in using the two?
Plz help.

Thanks and Regards
Yasir Hashmi
Re: Constraints [message #184652 is a reply to message #184648] Thu, 27 July 2006 06:15 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
NOT DEFERRABLE: This constraint may not be set to DEFERRED, and is by implication, always applied at the time the DML is executed.

DEFERRABLE: This constraint may be deferred by using the SET CONSTRAINT command.

INITIALLY IMMEDIATE: The constraint is created with a current state of IMMEDIATE, meaning it is applied with the DML

INITIALLY DEFERRABLE: The constraint is created with a current state of DEFERRED, meaning it is applied when a commit is issued.
Re: Constraints [message #184686 is a reply to message #184573] Thu, 27 July 2006 08:15 Go to previous messageGo to next message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
So if i have rightly understood DEFERRABLE can be set to NOT DEFERRABLE or IMMEDIATE as
SET CONSTRAINT constr_name DEFERRABLE INITIALLY IMMEDIATE;
but NOT DEFERRABLE or IMMEDIATE cannot be set as DEFERRABLE.
Re: Constraints [message #184687 is a reply to message #184686] Thu, 27 July 2006 08:17 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Correct.
A constraint that is created as DEFFERABLE can be set to either DEFFERED or IMMEDIATE.
Otherwise it must always be IMMEDIATE
Previous Topic: Regardind the Patches applied
Next Topic: My logs are switching every 5 mins, why?
Goto Forum:
  


Current Time: Tue Dec 06 00:27:16 CST 2016

Total time taken to generate the page: 0.13468 seconds