Create roles trigger

Поиск
Список
Период
Сортировка
От Александр Аникин
Тема Create roles trigger
Дата
Msg-id 1538039268.772929533@f494.i.mail.ru
обсуждение исходный текст
Список pgsql-hackers

Hey, folks!

I've got a question about events on roles creation.

I need to execute some custom logic on role creation.

All information about roles located in `pg_authid` table.
The first thing that comes to mind is to create trigger on `pg_authid` table, but this is not possible, because this is a system table.
Next thing, is to create a view (select * from pg_authid) and create trigger on view, but this didn't work out too.

One more thing is to create event trigger (CREATE EVENT TRIGGER trigger ON ddl_command_start WHEN TAG IN ('CREATE ROLE')), but it's also not possible, event triggers are not supported for 'CREATE ROLE'.

Is there is any possibility to do that ? May be, create custom extension or something else.

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Problem while setting the fpw with SIGHUP
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Problem while setting the fpw with SIGHUP