retrieving fields in plpgsql

Started by James Gregoryabout 23 years ago1 messagesgeneral
Jump to latest
#1James Gregory
james@anchor.net.au

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.