After Trigger assignment to NEW

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема After Trigger assignment to NEW
Дата
Msg-id Pine.LNX.4.44.0602241831280.19738-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответы Re: After Trigger assignment to NEW
Список pgsql-sql
Hi,

i am currently on 7.4.12, and i what i try to do
is having an AFTER row trigger nullify one NEW column,
so as to prevent a subsequent (AFTER row) trigger from using this column's 
data.

Unfortunately this nullification (assignment) does not have 
any effect on the next AFTER trigger.

The first trigger is in pl/pgsql, and the second
is in C.

One possible use of the above (if it worked) would be the following.
Suppose the next AFTER triger is the (enhanced version of) dbmirror 
trigger which takes care of FK constraints and navigates thru the graph
in order to mirror all depenent tables' rows too.

Suppose there is no need to mirror a specific parent table.
Then in the child table i write an AFTER trigger that nullifies
this columns which is FK to the said parent table, and so prevent
the unwanted traversal from happening in the execution of the next
AFTER trigger (dbmirror).

I'd like to ask, if it is considered the right behaviour
and if there is a plan in changing it.

Is there a reason that the NEW values should remain unchanged in AFTER 
row triggers?

-- 
-Achilleus



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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: "Installing" dbLink
Следующее
От: Tom Lane
Дата:
Сообщение: Re: After Trigger assignment to NEW