Re: BUG #15106: The AFTER trigger is created separately on view, and the DML operation can not trigger the trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15106: The AFTER trigger is created separately on view, and the DML operation can not trigger the trigger
Дата
Msg-id 32633.1520886453@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #15106: The AFTER trigger is created separately on view,and the DML operation can not trigger the trigger  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15106: The AFTER trigger is created separately on view, andthe DML operation can not trigger the trigger
Список pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> It can be seen from the above example, the DML operation cannot trigger the
> trigger when the Statement-level AFTER trigger is created on view alone. 
> But when create INSTEAD OF trigger at the same time, the DML operation can
> trigger the AFTER trigger.

When there's no INSTEAD OF trigger, the query is rewritten into an insert
on the view's base table (assuming the view is simple enough to be
auto-updatable), and we fire the base table's statement triggers, not the
view's.  I'm pretty sure this is intentional, though I couldn't find it
mentioned in the manual either.  Firing both sets of statement triggers
would be confusing, and not firing the base table's triggers would
perhaps miss processing that needs to happen.

            regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #15096: Unable to CREATE TABLE LIKE with bigint identitycolumn
Следующее
От: P O'Toole
Дата:
Сообщение: Weird return-value from pg_get_function_identity_arguments() oncertain aggregate functions?