Is there a way to detect that code is inside CREATE EXTENSION?

Поиск
Список
Период
Сортировка
От Michel Pelletier
Тема Is there a way to detect that code is inside CREATE EXTENSION?
Дата
Msg-id CACxu=vL28Rew2P6TP05BdUS3m9J5-7H3rgbsa_GTBd6X+o=GZw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is there a way to detect that code is inside CREATE EXTENSION?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I'm working with an event trigger that fires on ALTER TABLE and regenerates certain objects, but unfortunately those objects end up being owned by any extensions that run ALTER TABLE and any subsequent alterations fail to regenerate because they are owned by that extension.

Ideally, I'd like to be able to detect inside my trigger if I'm being called from CREATE EXTENSION or not, but I can't find any obvious way to detect that.  I hope this isn't obvious and I just missed something in the documentation.  Does anyone have any pointers or hacks they know of that can accomplish this?

Thanks,

-Michel

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

Предыдущее
От: higherone
Дата:
Сообщение: Re: Is there a way to know write statistics on an individual index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is there a way to detect that code is inside CREATE EXTENSION?