Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:41 AM
Frank van Vugt
Guest
 
Posts: n/a
Default manually setting a 'for each statement' to 'deferrable initially deferred' -> any unforeseen side effects?

L.S.

Postgresql version 7.4.3 does not allow declaration of a 'for each statement'
constraint trigger:

db=# \h create constraint
Command: CREATE CONSTRAINT TRIGGER
Description: define a new constraint trigger
Syntax:
CREATE CONSTRAINT TRIGGER name
AFTER events ON
tablename constraint attributes
FOR EACH ROW EXECUTE PROCEDURE funcname ( args )

db=# \h create trigger
Command: CREATE TRIGGER
Description: define a new trigger
Syntax:
CREATE TRIGGER name { BEFORE | AFTER } { event [ OR ... ] }
ON table [ FOR [ EACH ] { ROW | STATEMENT } ]
EXECUTE PROCEDURE funcname ( arguments )


Since I need deferrable 'for each statement' triggers, I'd like to manually
set pg_trigger.tgdeferrable and pg_trigger.tginitdeferred to TRUE.

This seems to work properly, but I'm wondering about any unforeseen side
effects of this. Any comments on this?


NB. will v8.0 allow a direct 'create contraint trigger' ?



--
Best,




Frank.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles