Re: hostory tables with a generic function?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: hostory tables with a generic function?
Date: 2004-08-10 20:54:58
Message-ID: 1409.1092171298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net> writes:
> - is it possible to write only one function used for all logging triggers?

Yes, but it will be very hard and inefficient (maybe even impossible)
in plpgsql. plpgsql isn't intended for dynamic field access and you'll
really be fighting the language.

I'd suggest writing in C, perhaps after proofing in pltcl.

There are some sample C triggers in the contrib tree that do things
fairly close to this; you might try adapting one of those.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2004-08-10 21:33:16 Re: Losing records when server hang
Previous Message Jonathan Barnhart 2004-08-10 20:45:26 Transaction blocks