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

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема manually setting a 'for each statement' to 'deferrable initially deferred' -> any unforeseen side effects?
Дата
Msg-id 200408181207.14872.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Список 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: indexed column not working as fast as expected
Следующее
От: Joel
Дата:
Сообщение: Re: apple uses Postgres for RemoteDesktop 2