From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Event trigger and CREATE/ALTER ROLE/USER |
Date: | 2016-09-18 11:44:29 |
Message-ID: | CAB7nPqRC3ePmBryJ5dvShVLiu5vVWRQQ_TxP23XGodum=y6u1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 14, 2016 at 11:09 AM, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2016-09-18 13:21:23 | Re: Fix for PL/Python slow input arrays traversal issue |
Previous Message | Heikki Linnakangas | 2016-09-18 11:14:51 | Re: ecpg -? option doesn't work in windows |