RECORD fields by name - Mailing list pgsql-general

From Erik Ronström
Subject RECORD fields by name
Date
Msg-id 20030501130933.29765.qmail@web13804.mail.yahoo.com
Whole thread Raw
Responses Re: RECORD fields by name  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
In a plpgsql function, is it possible to retrieve values from a RECORD
if the fieldname is not known when writing the function?

I'm writing a trigger function which takes a table name and a field
name as arguments and modifies NEW. The problem is that I can't figure
out how to access NEW.[fieldname], since [fieldname] cannot be a
variable.

Erik

__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer


pgsql-general by date:

Previous
From: Søren Neigaard
Date:
Subject: PostgreSQL backup script
Next
From: Tom Lane
Date:
Subject: Re: RECORD fields by name