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.