pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: Miles Elam <miles.elam@productops.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Event Triggers and Dropping Objects
Date: Mon, 7 Oct 2019 16:12:52 -0400
Message-ID: <20191007201252.GB4731@momjian.us> (raw)
In-Reply-To: <CAKoxK+7Kk7n_0f6xS4ygGBDadc6=-8U8RK_uz7Lv+x2NVMvKTA@mail.gmail.com>
References: <CAALojA_twdT4mRKHgWn9xE6XsbnqF9RVWXjLtGZD0xr_EO72+g@mail.gmail.com>
	<CAKoxK+7Kk7n_0f6xS4ygGBDadc6=-8U8RK_uz7Lv+x2NVMvKTA@mail.gmail.com>

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.elam@productops.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@momjian.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 +





view thread (6+ messages)  latest in thread

Message-ID: <20191007201252.GB4731@momjian.us>
Permalink:  ../20191007201252.GB4731@momjian.us/
Also on:    postgresql.org/message-id/20191007201252.GB4731@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bruce@momjian.us, fluca1978@gmail.com, miles.elam@productops.com
  Subject: Re: Event Triggers and Dropping Objects
  In-Reply-To: <20191007201252.GB4731@momjian.us>
  References: <CAALojA_twdT4mRKHgWn9xE6XsbnqF9RVWXjLtGZD0xr_EO72+g@mail.gmail.com> <CAKoxK+7Kk7n_0f6xS4ygGBDadc6=-8U8RK_uz7Lv+x2NVMvKTA@mail.gmail.com> <20191007201252.GB4731@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox