On Sun, Sep 17, 2017 at 4:52 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I think the reason this fails is that on the way out of the CREATE
> EXTENSION command, the event trigger code sees that an event trigger
> exists, so it tries to call it. But because no event trigger existed
> when we started the CREATE EXTENSION command, the necessary
> infrastructure hasn't been set up --- in particular,
> EventTriggerBeginCompleteQuery did nothing at the time.
That's rather tricky, the failure happens when doing the CREATE EVENT
TRIGGER command within the CREATE EXTENSION command which is done
within ProcessUtilitySlow. I am wondering if a somewhat-elegant way to
solve such problems would be to introduce a function able to
temporarily disable and enable event triggers to happen in the context
of an extension creation, in a design similar to
pg_extension_config_dump.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs