Re: Event Triggers: adding information

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Event Triggers: adding information
Date: 2013-01-28 23:19:07
Message-ID: m2txq0aob8.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Browne <cbbrowne(at)gmail(dot)com> writes:
> I'm poking at event triggers a bit; would like to set up some examples
> (and see if they
> work, or break down badly; both are interesting results) to do some
> validation of schema
> for Slony.

Cool, thanks!

> What I'm basically thinking about is to set up some event triggers that run on
> DROP TABLE / DROP SEQUENCE, and see about cleaning up the replication
> side of things (e.g. - inject a request to drop the table/sequence
> from replication).

Sure. In what got commited from the current patch series, you will only
know that a DROP TABLE (or DROP SEQUENCE) occured, and we're trying to
get to an agreement with Robert if we should prefer to add visibility to
such events that occurs in a CASCADE statement or rather add the OID
(and maybe the name) of the Object that's going to be dropped.

Your opinion is worth a lot on that matter, if you have one to share! :)

> I have a bit of a complaint as to what documentation is included; I don't see
> any references in the documentation to ddl_command_start / ddl_command_end,
> which seem to be necessary values for event triggers.

What we have now here:

http://www.postgresql.org/docs/devel/static/event-trigger-matrix.html
http://www.postgresql.org/docs/devel/static/sql-createeventtrigger.html
http://www.postgresql.org/docs/devel/static/plpgsql-trigger.html#PLPGSQL-EVENT-TRIGGER

Is it not visible enough, or really missing the point?

> I'd tend to think that there should be a new subsection in the "man page" for
> CREATE TRIGGER that includes at least two fully formed examples of event
> triggers, involving the two events in question. Is change of that
> sort in progress?

The event triggers are addressed in a whole new chapter of the docs,
maybe that's why you didn't find the docs?

--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2013-01-28 23:57:41 Re: error C2011 in Visual Studio 2012
Previous Message Christopher Browne 2013-01-28 23:07:32 Re: Event Triggers: adding information