Re: Accessing field of OLD in trigger

From: Josh Trutwin <josh(at)trutwins(dot)homeip(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Accessing field of OLD in trigger
Date: 2007-10-12 13:18:12
Message-ID: 20071012081812.358a9543@prokofiev.trutwins.homeip.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 12 Oct 2007 12:00:55 +0200 (CEST)
Daniel Drotos <drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message rdyes 2007-10-12 14:06:56 How to escape a memo field as a binary value in postgresql
Previous Message Daniel Drotos 2007-10-12 10:00:55 Accessing field of OLD in trigger