Re: Event Triggers and Dropping Objects

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>
Cc: Miles Elam <miles(dot)elam(at)productops(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Event Triggers and Dropping Objects
Date: 2019-10-07 20:12:52
Message-ID: 20191007201252.GB4731@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Oct 5, 2019 at 10:50:14AM +0200, Luca Ferrari wrote:
> On Fri, Oct 4, 2019 at 10:38 PM Miles Elam <miles(dot)elam(at)productops(dot)com> wrote:
> >
> > The event trigger firing matrix lists tags like DROP TABLE and DROP FUNCTION are listed below the ddl_command_end event, but when I created a basic audit table and event trigger, they don't seem to fire. I know sql_drop exists, but again the matrix lists DROP commands in the ddl_command_end event.
>
> Yes, I think this is a little misleading:
> <https://www.postgresql.org/docs/11/event-trigger-matrix.html>.
> The ddl_command_end is issued, and the function is invoked, but
> pg_event_trigger_ddl_commands() returns NULL on such invocation
> because sql_drop is the event with the attached data.

Do the Postgres docs need improvement here?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Aronesty 2019-10-07 20:39:07 Re: pgcrypto question
Previous Message Tomas Vondra 2019-10-07 19:49:51 Re: pgcrypto question