Re: Is it possible to use an EVENT TRIGGER to validate a TRIGGER?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Is it possible to use an EVENT TRIGGER to validate a TRIGGER?
Дата
Msg-id 20160706030207.GA608057@alvherre.pgsql
обсуждение исходный текст
Ответ на Is it possible to use an EVENT TRIGGER to validate a TRIGGER?  (Luís Eduardo Oliveira Lizardo <lizardo.luis@gmail.com>)
Ответы Re: Is it possible to use an EVENT TRIGGER to validate a TRIGGER?  (Luís Eduardo Oliveira Lizardo <lizardo.luis@gmail.com>)
Список pgsql-general
Luís Eduardo Oliveira Lizardo wrote:
> Hi,
>
> Is it possible to use an EVENT TRIGGER to validate a TRIGGER definition?
>
> What I want is to guarantee that the trigger is fired AFTER a STATEMENT, on
> INSERT or UPDATE but not on DELETE, like the following example:

What you can do with a C language function in 9.5 is to examine the
CreateTrigger struct and verify that it matches the conditions you want.
So, yes, it's possible, but not in plpgsql.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: How sync settings or extensions in streaming replication
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: Possible to create canonicalized range type without being superuser?