How to iterate fields into a NEW.* RECORD in a TRIGGER procedure ?

From: Bruno Baguette <bruno(dot)baguette(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to iterate fields into a NEW.* RECORD in a TRIGGER procedure ?
Date: 2010-10-13 22:32:11
Message-ID: 4CB6336B.3090706@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello !

I would like to write a PL/PGSQL trigger that will store changes (Table
name / Column name / primary key id / OLD value / NEW value) in several
tables.

As I said, this trigger must be usable for every table (it assumes that
theses table will have only one primary key).

In order to that, I have to iterate fields into the NEW.*
How can I do that iteration ?

Many thanks in advance for any tips !

Regards,

--
Bruno Baguette

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2010-10-13 22:34:27 Re: Adding a New Column Specifically In a Table
Previous Message Darren Duncan 2010-10-13 22:29:44 Re: Adding a New Column Specifically In a Table