Re: How to get a notification - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to get a notification
Date
Msg-id 411904ee-d747-49c2-a10d-f0b8eae49ed1@aklaver.com
Whole thread Raw
In response to Re: How to get a notification  (Igor Korot <ikorot01@gmail.com>)
List pgsql-general
On 2/7/25 11:43, Igor Korot wrote:
> Hi, Adrian,
> 
> 

> 
>     It is not about the interface it is about, from link above:
> 
>     "pg_event_trigger_ddl_commands returns a list of DDL commands executed
>     by each user action, when invoked in a function attached to a
>     ddl_command_end event trigger."
> 
> 
> Is there a sample code i can look at?

Search:

https://duckduckgo.com/?q=pg_event_trigger_ddl_commands+example&t=ffab&ia=web

and ye shall find:

https://stackoverflow.com/questions/23488228/how-to-get-sql-text-from-postgres-event-trigger

> Also what is PostgreSQL version this function is introduced?

At top  of Postgres doc pages are version specific links.

Go to:

https://www.postgresql.org/docs/current/functions-event-
triggers.html#PG-EVENT-TRIGGER-DDL-COMMAND-END-FUNCTIONS

and click back on versions until you don't find it.


> 
> Thank you.

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Igor Korot
Date:
Subject: Re: How to get a notification
Next
From: Robert Leach
Date:
Subject: Re: How to perform a long running dry run transaction without blocking