Re: event trigger API documentation? - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: event trigger API documentation?
Date
Msg-id m238uonr90.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: event trigger API documentation?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: event trigger API documentation?
Re: event trigger API documentation?
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Offhand, that seems about enough, but I'm just beginning to explore.

I'm interested into hearing about any such use case…

> Chances are, event triggers will end up somewhere near the top of the
> release announcements, so we should have a consistent message about what
> to do with them and how to use them.  If for now, we say, we only
> support writing them in PL/pgSQL, and here is how to do that, and here
> are some examples, that's fine.  But currently, it's not quite clear.

I would prefer that we're silent about them for another (couple of?)
release, because we didn't reach yet the feature set that I did consider
the bare minimum. In my view 9.3 only has code infrastructure to prepare
for the ability to implement Event Triggers later. That this
infrastructure already allows you to do some things with it is like a
proof of concept.

> Surely you had some use cases in mind when you set out to implement
> this.  What were they, and where are we now in relation to them?

I have mainly 4 use cases for them, and none of them are possible to
implement in 9.3:
 - audit (separate log or audit tables for commited only actions) - ddl support for replications (trigger based,
logicalrep.) - ddl extensibility - apt-get for extensions without dynamically loaded module 

The extension items is an example of the more general "ddl
extensibility" item. Don't worry about ever seeing a patch to core for
implementing it, the whole Event Trigger and Extension Templates
exercise is meant to allow for coding that kind of crazy ideas out of
core.

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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Enabling Checksums
Next
From: Daniel Farina
Date:
Subject: Re: Enabling Checksums