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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group