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-12 10:00:55
Message-ID: Pine.LNX.4.64.0710121158300.560@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

Ps: sorry about my previouse try of posting this message, it went to
wrong place.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Trutwin 2007-10-12 13:18:12 Re: Accessing field of OLD in trigger
Previous Message Daniel Drotos 2007-10-11 12:17:15 Accessing field of OLD in trigger