Re: Iterating over rowtype/record fields? - Mailing list pgsql-general

From Tom Lane
Subject Re: Iterating over rowtype/record fields?
Date
Msg-id 2979.1021557137@sss.pgh.pa.us
Whole thread Raw
In response to Iterating over rowtype/record fields?  (Bill Gribble <grib@linuxdevel.com>)
List pgsql-general
Bill Gribble <grib@linuxdevel.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

pgsql-general by date:

Previous
From: Bill Gribble
Date:
Subject: Iterating over rowtype/record fields?
Next
From: Jeff Eckermann
Date:
Subject: Re: XML from postgreSQL tables