CREATE TRIGGER ... FOR EACH STATEMENT - Mailing list pgsql-sql

From Mischa Sandberg
Subject CREATE TRIGGER ... FOR EACH STATEMENT
Date
Msg-id 1Txid.94791$9b.89312@edtnps84
Whole thread Raw
List pgsql-sql
I notice a dearth of description of the FOR EACH STATEMENT flavour of 
triggers, even though OLD_TABLE and NEW_TABLE are mentioned.

After years of Sybase & MSSQL, being able to deal with the entire
INSERTED/DELETED rowsets in a trigger, rather than nibbling away
row by row, has been a great efficiency boost. In fact, the only I've
resorted to FOR EACH ROW triggers is where joining OLD_TABLE and
NEW_TABLE by primary key burned the CPU --- both pseudo-tables being
very large in some updates, and perforce having no indexes ...

I can see from  src/backend/command/trigger.c that 
ExecASInsertTriggers() would have a hard time getting at the equivalent
of OLD_TABLE and NEW_TABLE, ExecBSInsertTriggers even worse.

Anyone else out there who feels this would be a significant
enhancement?


pgsql-sql by date:

Previous
From: Bricklen
Date:
Subject: Re: Simple SQL Question
Next
From: Michael Fuhr
Date:
Subject: Re: Scheduling Jobs In PostgreSQL