Skip site navigation (1) Skip section navigation (2)

Re: Dynamic access to record columns (in PL/pgsql)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniele Mazzini <daniele(dot)mazzini(at)libero(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic access to record columns (in PL/pgsql)
Date: 2006-09-30 16:47:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Daniele Mazzini <daniele(dot)mazzini(at)libero(dot)it> writes:
> I have a trigger procedure which I want to be called after insert or 
> update on different tables. In this procedure, I need to find the values 
> of key fields for the affected table in the NEW record, but I can't find 
> a way to access a field the name of which I only know at execution time. 

There is no way to do that in plpgsql.  You could do it in the other PLs
(eg plperl, pltcl) since they are not as strongly typed as plpgsql.

			regards, tom lane

In response to


pgsql-general by date

Next:From: Jan DanielssonDate: 2006-09-30 18:34:05
Subject: Potentially annoying question about date ranges
Previous:From: Tom LaneDate: 2006-09-30 16:28:17
Subject: Re: memory issues when running with mod_perl

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group