X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 26A24D1B196 for ; Mon, 31 May 2004 03:15:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65641-08 for ; Mon, 31 May 2004 03:15:00 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A8026D1B18C for ; Mon, 31 May 2004 03:14:57 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i4V6EuRb013913; Mon, 31 May 2004 02:14:56 -0400 (EDT) To: basic Cc: pgsql-sql@postgresql.org Subject: Re: passing new/old record in pl/pgsql trigger functions to other functions In-reply-to: <40BAC7E5.4020509@mozdev.org> References: <40BAC7E5.4020509@mozdev.org> Comments: In-reply-to basic message dated "Mon, 31 May 2004 13:51:33 +0800" Date: Mon, 31 May 2004 02:14:56 -0400 Message-ID: <13912.1085984096@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/222 X-Sequence-Number: 17936 basic writes: > In Postgresql version 7.4.1 How does one pass new/old record in a > pl/pgsql trigger function to other functions? You can't ... NEW and OLD are of unspecified-record types, and there's no support for passing such things to other functions. You pretty much have to do the tedious "myfunc(NEW.f1, NEW.f2, ...)". I've done some work recently to improve the support for passing record types around as full-fledged datatypes. The above still doesn't quite work, and I can't promise that it'll get done for 7.5, but hopefully by the release after that it will. regards, tom lane