retrieving fields in plpgsql

From: James Gregory <james(at)anchor(dot)net(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: retrieving fields in plpgsql
Date: 2003-03-19 16:32:20
Message-ID: 1048091540.30665.58.camel@pirate.bridge.anchor.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chamal desilva 2003-03-19 16:38:42 Starting postmaster
Previous Message wsheldah 2003-03-19 16:17:37 Error loading /usr/lib/postgresql/plpgsql.so