From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Neethu P <neeth_3(at)hotmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Event Triggers unable to capture the DDL script executed |
Date: | 2023-02-22 09:51:33 |
Message-ID: | 714b89f449005ed4348e2114f6ce5f8aff18ea8a.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 2023-02-22 at 07:57 +0000, Neethu P wrote:
> We are using event triggers to capture the DDL changes in a postgres database.
> However, we are unable to get the column information & the actual DDL script
> executed, while a table is altered.
> Also, in the postgres documentation for pg_event_trigger_ddl_commands ()- it is mentioned as below.
> pg_ddl_command A complete representation of the command, in internal
> format. Thiscannot be output directly, but it can be passed to other functions
> to obtain different pieces of information about the command.
>
> Is it possible to access pg_ddl_command in postgresql? Or is there any scripts
> which can help to get theactual Alter DDL statement that was executed by the user?
That is simple if you write the event trigger in C. I would say that that is the
only way to get at the actual statement.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | n.kobzarev | 2023-02-22 10:03:48 | RE: Event Triggers unable to capture the DDL script executed |
Previous Message | HECTOR INGERTO | 2023-02-22 09:41:37 | PostgreSQL optimizations for CoW FS |