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

Re: How to determine field names in a trigger?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Justin Clift <jc(at)telstra(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to determine field names in a trigger?
Date: 2004-06-29 05:09:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Tue, Jun 29, 2004 at 01:59:11PM +1000, Justin Clift wrote:


> I'm creating a centralised table to keep a log of changes in other tables.
> In thinking about the PL/pgSQL trigger to write and attach to the 
> monitored tables (probably a row level AFTER trigger), I can see two 
> approaches:

I think you can do this very easily with PL/Tcl.  For a somewhat
unrelated example, see General Bits issue #47,

_I think_ there are examples closer to what you want to achieve in the
archives.  The array of column names in a trigger is $TG_relatts.

Hope this helps,

Alvaro Herrera (<alvherre[a]>)
"La libertad es como el dinero; el que no la sabe emplear la pierde" (Alvarez)

In response to


pgsql-general by date

Next:From: Mike CastleDate: 2004-06-29 05:51:37
Subject: Re: Multiple databases on seperate drives/file systems?
Previous:From: Együd CsabaDate: 2004-06-29 04:52:56
Subject: Re: Performance problem on RH7.1

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