Re: Statement triggers 7.4 NEW/OLD - Mailing list pgsql-sql

From Jan Wieck
Subject Re: Statement triggers 7.4 NEW/OLD
Date
Msg-id 3EA9EFA3.EF4C0D1@Yahoo.com
Whole thread Raw
In response to Statement triggers 7.4 NEW/OLD  (Andreas Pflug <Andreas.Pflug@web.de>)
Responses Re: Statement triggers 7.4 NEW/OLD  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Andreas Pflug wrote:
> 
> How can I address the rows affected by an insert/update/delete statement
> in pl/pgsql?
> The doc says that NEW and OLD will be NULL for statement triggers, which
> makes sense because NEW and OLD are of type RECORD, capable of holding
> only a single row.
> So where's the beef?

IMHO statement triggers instead should have access to the NEW and OLD
rows through some mechanism. I can think of NEW and OLD being reference
cursors in the case of statement triggers, and the trigger then can
FETCH the rows from there.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: create/alter/drop within transactions?
Next
From: Jan Wieck
Date:
Subject: Re: /* */ comments showing up in pg_stat_activity