Re: feature proposal - triggers by semantics - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: feature proposal - triggers by semantics
Date
Msg-id 50A59A3F.1040808@2ndQuadrant.com
Whole thread Raw
In response to Re: feature proposal - triggers by semantics  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On 11/16/2012 05:38 AM, Dimitri Fontaine wrote:
> Darren Duncan <darren@darrenduncan.net> writes:
>> So, I'm partly proposing a specific narrow new feature, "TRUNCATE FOR EACH
>> ROW"
> Kevin has been proposing that we consider an alternative approach in
> some other cases that I think would work better for you, too. Namely, to
> have access to OLD and NEW in FOR EACH STATEMENT triggers, where they
> would be relations rather than records.

That would be an exceedingly useful feature. On the project I was
working on earlier I'd immediately rewrite quite a few of the triggers
if it became available, with results I'd expect to be both faster and
simpler.

I can see using the same facility to optimise foreign key validity
checks in the absence of an index on the foreign key column, too.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Do we need so many hint bits?
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: [PATCH] binary heap implementation