Simple row serialization?

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Simple row serialization?
Date: 2008-01-26 16:54:17
Message-ID: fnfojr$ms7$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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
(received for example in a AFTER INSERT trigger) into a string that I'd
store in the log table. There's a limited number of field types
involved: varchars, integers and booleans. I'm not looking for anything
fancy, comma-separated string result will be just fine; Even better,
something like a dictionary ("field_name":"field_value",...) would be
nice. The reason for trying to do it this way is that I don't want to
create separate log tables for every table I wish to log.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2008-01-26 16:55:47 Re: Truncate Triggers
Previous Message Gregory Stark 2008-01-26 16:33:53 Re: Truncate Triggers