Adam Rich wrote:
>> I'd like to implement some simple data logging via triggers on a small
>> number of infrequently updated tables and I'm wondering if there are
>> some helpful functions, plugins or idioms that would serialize a row
>
>
> If you're familiar with perl, you can try PL/Perl.
Thanks, but another solution has been suggested to me, much simpler:
create or replace function data_log() returns trigger as $$
declare
sdata text;
begin
sdata = new;
insert into log(data) values (sdata);
return NULL;
end;
$$ language plpgsql;
create trigger data_insert after insert on data
for each row execute procedure data_log();
(from idea by Tom Lane)