Re: Batch API for After Triggers - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Batch API for After Triggers
Date
Msg-id 20130609040850.GO7200@tamriel.snowman.net
Whole thread Raw
In response to Batch API for After Triggers  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Batch API for After Triggers
List pgsql-hackers
* Simon Riggs (simon@2ndQuadrant.com) wrote:
> While fiddling with FK tuning, Noah suggested batching trigger
> executions together to avoid execution overhead.

I like the general idea, but I'd prefer a way to avoid having to queue
up tons of trigger events to be executed in the first place.
Aggregates do this by providing a way to store up information to be
processed by an eventual 'final' function.  Another option, as Kevin
asked about, would be statement level triggers which are able to see
both the OLD and the NEW versions of the relation.

The per-row trigger option with a way to be called immediately and then
store what it cares about for a later final function strikes me as very
generalized and able to do things that the statement-level option
couldn't, but I'm not sure if there's a use-case that could solve which
the OLD/NEW statement trigger capability couldn't.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding
Next
From: Noah Misch
Date:
Subject: Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding