Re: How to get a notification

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to get a notification
Date: 2025-02-07 21:16:08
Message-ID: 411904ee-d747-49c2-a10d-f0b8eae49ed1@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-02-07 21:36:54 Re: How to perform a long running dry run transaction without blocking
Previous Message Igor Korot 2025-02-07 19:43:24 Re: How to get a notification