Re: Accessing insert values in triggers - Mailing list pgsql-performance

From Michael Fuhr
Subject Re: Accessing insert values in triggers
Date
Msg-id 20050203080142.GA47411@winnie.fuhr.org
Whole thread Raw
In response to Accessing insert values in triggers  (Hasnul Fadhly bin Hasan <hasnulfadhly.h@mimos.my>)
List pgsql-performance
On Wed, Feb 02, 2005 at 06:02:28PM +0800, Hasnul Fadhly bin Hasan wrote:

> When new data is inserted, we have to use new.xxxx to access the data.
> Is there another way to access the data that would be more generic
> like value[1] and so on?  This way, the tracker is independant of any
> tables.

Procedural languages like PL/Perl, PL/Tcl, and PL/Python can access
NEW and OLD columns without knowing the column names in advance.

http://www.postgresql.org/docs/8.0/static/plperl-triggers.html
http://www.postgresql.org/docs/8.0/static/pltcl-trigger.html
http://www.postgresql.org/docs/8.0/static/plpython-trigger.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: horizontal partition
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: GiST indexes and concurrency (tsearch2)