Re: Regarding extension

Поиск
Список
Период
Сортировка
От Natarajan R
Тема Re: Regarding extension
Дата
Msg-id CAPqxBt4pkP1X3UeSt9UmHUK5KnG0aXfGfa97bmk=9X78QWhxzA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Regarding extension  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: Regarding extension  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


On Thu, 3 Oct 2019 at 20:54, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
On Thu, Oct 03, 2019 at 07:51:04PM +0530, Natarajan R wrote:
>Thanks for your response Euler.
>
>1)
>"id" i meant by database id
>
>I make my question simple, " during pg_init i want to get databaseid's in
>which my extension is installed... "
>1. by using pg_database and pg_extension catalogs
>2. if there any other way, kindly suggest me.
>

Well, there's also MyDatabaseId variable, which tells you the OID of the
current database. So you can use that, from the C code. In SQL, you can
simply run "SELECT current_database()" or something like that.

Me:  Thanks Tomas, But this is for that particular database only, I want to get the list of database Id's on which my extension is installed during PG_INIT itself...

>
>2)
>I have one sql file which will be loaded during create extension, in that
>file only i have code for event trigger for create extension on
>ddl_command_end event....
>My question is "When giving create extension, sql file will be loaded at
>that time only, if that is the case, this event trigger will be invoked or
>not? "
>

I'm not sure I understand the question. Are you asking if the event
trigger will be invoked to notify you about creation of the extension
containing it? I'm pretty sure that won't happen - it will be executed
only for future CREATE EXTENSION commands.

Me: Thanks Tomas, Yaah, what you said above is the way it should perform, but this trigger has been invoked in postgres 10.0 but not in postgres 10.4.. So, i am asking any GUC or anything need to be enabled to invoke this type of event triggers in 10.4 version tooo..

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Memory Accounting
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum