Accessing field of OLD in trigger

From: Daniel Drotos <drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Accessing field of OLD in trigger
Date: 2007-10-11 12:17:15
Message-ID: Pine.LNX.4.64.0710111406330.19096@mazsola.iit.uni-miskolc.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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])...

Daniel

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel Drotos 2007-10-12 10:00:55 Accessing field of OLD in trigger
Previous Message Richard Huxton 2007-10-11 07:24:55 Re: Refactored queries needing validation of syntactic equivalence