Re: Event Triggers: adding information

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Event Triggers: adding information
Date: 2013-01-23 02:55:14
Message-ID: CA+TgmoYgpub59RrQ+n=qoejmADhj-kppCfDgQjWP+rR+8m+39Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 22, 2013 at 7:29 AM, Dimitri Fontaine
<dimitri(at)2ndquadrant(dot)fr> wrote:
> Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
>> I added some in the attached patch.
>>
>> doc/src/sgml/event-trigger.sgml | 10 ++
>> src/backend/commands/event_trigger.c | 6 +-
>> src/test/regress/expected/event_trigger.out | 106 +++++++++++++++++++
>> src/test/regress/sql/event_trigger.sql | 47 ++++++++
>> 4 files changed, 167 insertions(+), 2 deletions(-)
>
> And I did drop a comment line I didn't mean to when trying things out,
> so here's the update copy. There's a bug fix in there too, in both the
> versions of the patch, that the new regression tests exercise.

I think these new regression tests are no good, because I doubt that
the number of recursive calls that can fit into any given amount of
stack space is guaranteed to be the same on all platforms. I have
committed the bug fixes themselves, however.

I wasn't entirely happy with your proposed documentation so I'm
attaching a counter-proposal. My specific complaints are (1) telling
people that event triggers are run in a savepoint seems a little too
abstract; I have attempted to make the consequences more concrete; (2)
RAISE EXCEPTION is PL/pgsql specific and not the only possible reason
for an error; I have attempted to be more generic; and (3) in the
process of fiddling with this, I noticed that the ddl_command_end
documentation can, I believe, be made both shorter and more clear by
turning it into a rider on the previous paragraph.

Comments?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
event-trigger-docs.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-01-23 03:01:43 Re: Event Triggers: adding information
Previous Message Stephen Frost 2013-01-23 02:45:37 Re: lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples