From: Mischa Sandberg <ischamay.andbergsay@activestateway.com>
To: pgsql-sql@postgresql.org
Subject: CREATE TRIGGER ... FOR EACH STATEMENT
Date: Thu, 04 Nov 2004 22:16:29 GMT
Message-ID: <1Txid.94791$9b.89312@edtnps84> (raw)
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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ischamay.andbergsay@activestateway.com
Subject: Re: CREATE TRIGGER ... FOR EACH STATEMENT
In-Reply-To: <1Txid.94791$9b.89312@edtnps84>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox