retrieving fields in plpgsql - Mailing list pgsql-general

From James Gregory
Subject retrieving fields in plpgsql
Date
Msg-id 1048091540.30665.58.camel@pirate.bridge.anchor.net.au
Whole thread Raw
Responses Re: retrieving fields in plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi all,

I need to be able to get the value of a field in the new record provided
to triggers. The catch is that the name of the variable that I need will
be constructed at run time, it will then be used as part of a dynamic
query. So basically I want

x := "fieldname";
y := new.x;

Can it be done? how?

Thanks,

James.


pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Limitations in PL/perl
Next
From: Tom Lane
Date:
Subject: Re: retrieving fields in plpgsql