Re: Event trigger and CREATE/ALTER ROLE/USER - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Event trigger and CREATE/ALTER ROLE/USER
Date
Msg-id CAB7nPqRC3ePmBryJ5dvShVLiu5vVWRQQ_TxP23XGodum=y6u1w@mail.gmail.com
Whole thread Raw
In response to Re: Event trigger and CREATE/ALTER ROLE/USER  (Tatsuo Ishii <ishii@sraoss.co.jp>)
List pgsql-hackers
On Wed, Sep 14, 2016 at 11:09 AM, Tatsuo Ishii <ishii@sraoss.co.jp> wrote:
>> As I understand the issue, the main reason is that event triggers
>> execute procedures, and those exist in a single database only.  If you
>> were to create an event trigger in database A, then a user gets created
>> in database B, your function would not be invoked, which becomes a
>> problem.
>
> Can't we just create the event trigger in database B as well? We have
> been living with similar situation, for example, functions for years.
> (a work around would be creating functions in template1. This only
> works for freshly created database though).

Just a random thought: wouldn't what you are looking for be more
reliable if you use the utility hook and have it loaded via
preload_shared_libraries?
-- 
Michael



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench - allow to store select results into variables
Next
From: Dave Cramer
Date:
Subject: Re: Fix for PL/Python slow input arrays traversal issue