On Thu, 3 Oct 2019 at 20:54, Tomas Vondra <tomas.von...@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..

Reply via email to