Re: Iterating over rowtype/record fields?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Gribble <grib(at)linuxdevel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Iterating over rowtype/record fields?
Date: 2002-05-16 13:52:17
Message-ID: 2979.1021557137@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bill Gribble <grib(at)linuxdevel(dot)com> writes:
> I'm trying to write a fairly generic pl/pgsql trigger function to log
> changes to a specified set of tables into another table.

I'd recommend doing it in C ... the flexibility is there, and the
performance will be better too. There are several examples of C-coded
triggers in contrib:

contrib/fulltextindex/fti.c
contrib/lo/lo.c
contrib/noupdate/noup.c
contrib/spi/autoinc.c
contrib/spi/insert_username.c
contrib/spi/moddatetime.c
contrib/spi/refint.c
contrib/spi/timetravel.c
contrib/tsearch/txtidx.c

Some of these are probably very close to what you want already.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2002-05-16 14:11:24 Re: XML from postgreSQL tables
Previous Message Bill Gribble 2002-05-16 13:14:55 Iterating over rowtype/record fields?