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

Поиск
Список
Период
Сортировка
От Michel Pelletier
Тема Re: Is there a way to detect that code is inside CREATE EXTENSION?
Дата
Msg-id CACxu=v+pNTdh7FvnXjAwwj90HNJsfkgLnFkuUhBxxF7F_rqbZQ@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


At the C-code level you can check the creating_extension global variable,
or maybe better look at the in_extension fields of CollectedCommands.

Thanks Tom!

That was the hint I needed, looks like pg_event_trigger_ddl_commands() has an in_extension boolean that seems like it will do what I need?   If I understand you correctly that's what you're referring to with CollectedCommands.   Testing it now but that looks like the answer for me, if any of those are true then I can just skip the regeneration. 

-Michel

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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Is there a way to detect that code is inside CREATE EXTENSION?
Следующее
От: Shaozhong SHI
Дата:
Сообщение: Re: print in plpython not appearing in logs