Re: Regarding extension - Mailing list pgsql-hackers

From Natarajan R
Subject Re: Regarding extension
Date
Msg-id CAPqxBt5hWnOZSUdpOP0o27g09nYgZFaUhaTzu7NLJYBqM6s4TQ@mail.gmail.com
Whole thread Raw
In response to Re: Regarding extension  (Euler Taveira <euler@timbira.com.br>)
Responses Re: Regarding extension
List pgsql-hackers
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.


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? "

Thanks...


On Thu, 3 Oct 2019 at 19:31, Euler Taveira <euler@timbira.com.br> wrote:
Em qui, 3 de out de 2019 às 02:24, Natarajan R <nataraj3098@gmail.com> escreveu:
>
> I am creating sample extension in postgres, For that "During PG_INIT, i want to get the list of database Id's in which my extension is installed". Is there a way to get this?
>
I'm not sure what you mean by "ld". However, if you want to know an
extension is installed in a specific database, you should be logged in
it. That's because extension catalog is not global.

> How to have trigger for create extension?
>
Event triggers.


--
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Hooks for session start and end, take two
Next
From: Andrew Dunstan
Date:
Subject: fairywren failures