Re: Event Triggers reduced, v1

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Dimitri Fontaine <dfontaine@hi-media.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-06-19T00:12:23Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Replace int2/int4 in C code with int16/int32

Excerpts from Dimitri Fontaine's message of vie jun 15 16:27:50 -0400 2012:

> The attached patch contains all the infrastructure for event triggers
> and also a first implementation of them for the event "command_start",
> implemented in a single place in utility.c.
> 
> The infrastructure is about:
> 
>  - new catalog
>  - grammar for new commands
>  - documentation skeleton
>  - pg_dump support
>  - psql support
>  - ability to actually run user triggers
>  - written in "core languages"
>     (pl/c, pl/pgsql, pl/python, pl/perl, pl/tcl)
>  - limited subcommand handling

Did you try REASSIGN OWNED and DROP OWNED with a role that has defined
some event triggers?

> Look, it's an easy little skinny patch to review, right:
> 
> git --no-pager diff --shortstat master
>  62 files changed, 4546 insertions(+), 108 deletions(-)

Skinny ... right.  I started to give it a look -- I may have something
useful to comment later.

> This patch includes regression tests that we worked on with Thom last
> rounds, remember that they only run in the serial schedule, that means
> with `make installcheck` only. Adding noisy output at random while the
> parallel schedule run is a good way to break all the regression testing,
> so I've been avoiding that.

Hmm, I don't like the idea of a test that only runs in serial mode.
Maybe we can find some way to make it work in parallel mode as well.
I don't have anything useful to comment right now.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support