manually setting a 'for each statement' to 'deferrable initially deferred' -> any unforeseen side effects?

From: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: manually setting a 'for each statement' to 'deferrable initially deferred' -> any unforeseen side effects?
Date: 2004-08-18 10:07:14
Message-ID: 200408181207.14872.ftm.van.vugt@foxi.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Browse pgsql-general by date

  From Date Subject
Next Message Joel 2004-08-18 10:08:03 Re: apple uses Postgres for RemoteDesktop 2
Previous Message Gregory S. Williamson 2004-08-18 08:46:57 Re: indexed column not working as fast as expected