pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: basic <basic@mozdev.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: passing new/old record in pl/pgsql trigger functions to other functions
Date: Mon, 31 May 2004 02:14:56 -0400
Message-ID: <13912.1085984096@sss.pgh.pa.us> (raw)
In-Reply-To: <40BAC7E5.4020509@mozdev.org>
References: <40BAC7E5.4020509@mozdev.org>

basic <basic@mozdev.org> 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



view thread (2+ messages)

Message-ID: <13912.1085984096@sss.pgh.pa.us>
Permalink:  ../13912.1085984096@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13912.1085984096@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, basic@mozdev.org
  Subject: Re: passing new/old record in pl/pgsql trigger functions to other functions
  In-Reply-To: <13912.1085984096@sss.pgh.pa.us>

* 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