Re: Trigger with WHEN clause (WIP) - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Trigger with WHEN clause (WIP)
Date
Msg-id 1255694542.30088.3388.camel@ebony
Whole thread Raw
In response to Re: Trigger with WHEN clause (WIP)  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Fri, 2009-10-16 at 14:39 +0300, Peter Eisentraut wrote:
> On Fri, 2009-10-16 at 09:31 +0100, Simon Riggs wrote:
> > * It will reduce size of in-memory pending trigger list (for large
> > statements)
> 
> But this won't be the outcome when it's implemented the way it is being
> proposed, which checks the where clause just before executing the
> trigger function.

Thanks for pointing that out.

I'm giving reasons why we'd want a WHEN clause. If the current
implementation doesn't do all that it could, then ISTM thats a reason to
reject patch for now, but not for all time.

Incidentally, re-accessing a data block at end of statement may have
caused to block to fall out of cache and then be re-accessed again. So
optimising that away can save on I/O as well.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Application name patch - v2
Next
From: Tom Lane
Date:
Subject: Re: Trigger with WHEN clause (WIP)