Re: Regarding extension

From: Natarajan R <nataraj3098(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Euler Taveira <euler(at)timbira(dot)com(dot)br>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Regarding extension
Date: 2019-10-04 04:52:18
Message-ID: CAPqxBt4pkP1X3UeSt9UmHUK5KnG0aXfGfa97bmk=9X78QWhxzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 3 Oct 2019 at 20:54, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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..

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-10-04 04:57:58 Re: [HACKERS] Block level parallel vacuum
Previous Message Tom Lane 2019-10-04 04:36:01 Re: Memory Accounting