X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1C33247630B for ; Fri, 25 Apr 2003 22:32:27 -0400 (EDT) Received: from europa.janwieck.net (h00045a2e4e7c.ne.client2.attbi.com [24.131.181.55]) by postgresql.org (Postfix) with ESMTP id 5B1BF4762F1 for ; Fri, 25 Apr 2003 22:32:26 -0400 (EDT) Received: from Yahoo.com (dhcpclnt00.janwieck.net [192.168.192.100]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h3Q2WTa25182; Fri, 25 Apr 2003 22:32:29 -0400 Message-ID: <3EA9EFA3.EF4C0D1@Yahoo.com> Date: Fri, 25 Apr 2003 22:32:03 -0400 From: Jan Wieck Organization: Home X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en,ru MIME-Version: 1.0 To: Andreas Pflug Cc: pgsql-sql@postgresql.org Subject: Re: Statement triggers 7.4 NEW/OLD References: <3EA7CD6A.9080404@web.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-29.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/387 X-Sequence-Number: 13088 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 #