From: Josh Trutwin <josh@trutwins.homeip.net>
To: pgsql-sql@postgresql.org
Subject: Re: Accessing field of OLD in trigger
Date: Fri, 12 Oct 2007 08:18:12 -0500
Message-ID: <20071012081812.358a9543@prokofiev.trutwins.homeip.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710121158300.560@mazsola.iit.uni-miskolc.hu>
References: <Pine.LNX.4.64.0710121158300.560@mazsola.iit.uni-miskolc.hu>
On Fri, 12 Oct 2007 12:00:55 +0200 (CEST)
Daniel Drotos <drdani@mazsola.iit.uni-miskolc.hu> wrote:
> Hi,
>
>
> I'm working on a row level plpgsql trigger running after delete,
> using a 8.0.3 server. It gets a parameter which is a field name of
> the OLD record. How can that field be accessed?
>
> I'd like to do something like:
>
> for recvar in 'select OLD.'||quote_ident(TG_ARGV[0])...
I THINK you are out of luck here. I hear it's possible to do but in
one of the other PL languages say pl/tcl, though I can't seem to find
an example....
Josh
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: josh@trutwins.homeip.net
Subject: Re: Accessing field of OLD in trigger
In-Reply-To: <20071012081812.358a9543@prokofiev.trutwins.homeip.net>
* 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