Re: Before/After Trigger User Switching

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Before/After Trigger User Switching
Дата
Msg-id 17711.1061410347@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Before/After Trigger User Switching  ("Aasmund Midttun Godal" <postgresql@aasmund.com>)
Ответы Re: Before/After Trigger User Switching
Список pgsql-sql
"Aasmund Midttun Godal" <postgresql@aasmund.com> writes:
> When an operation is done throug a SECURITY DEFINER style function and 
> causes a trigger the current_user depends on whether it is executed BEFORE 
> or AFTER. I currently run 7.3.2. I believe the BEFORE behavior is correct 
> while the AFTER behavior is wrong. A bug? already fixed? 

An AFTER trigger is not fired until the interactive statement is about
to complete --- ie, after the SECURITY DEFINER function has returned.
There has been previous discussion (inconclusive) about changing the
time of invocation of AFTER triggers, but given the current timing this
is the behavior I'd expect.
        regards, tom lane


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

Предыдущее
От: Jomon Skariah
Дата:
Сообщение: Porting from PL/SQL to PLPGSQL
Следующее
От: "Moonstruck"
Дата:
Сообщение: Re: Reverse pattern match.