pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Hasnul Fadhly bin Hasan <hasnulfadhly.h@mimos.my>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-novice@postgresql.org
Subject: Re: [PERFORM] Accessing insert values in triggers
Date: Thu, 3 Feb 2005 01:01:42 -0700
Message-ID: <20050203080142.GA47411@winnie.fuhr.org> (raw)
In-Reply-To: <4200A534.3030405@mimos.my>
References: <4200A534.3030405@mimos.my>

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/



view thread (2+ messages)

Message-ID: <20050203080142.GA47411@winnie.fuhr.org>
Permalink:  ../20050203080142.GA47411@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050203080142.GA47411@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mike@fuhr.org, hasnulfadhly.h@mimos.my, pgsql-novice@postgresql.org
  Subject: Re: [PERFORM] Accessing insert values in triggers
  In-Reply-To: <20050203080142.GA47411@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox