Re: Cast record as text

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Cast record as text
Date: 2007-02-14 14:54:19
Message-ID: 20070214145419.GB11829@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Wed, dem 14.02.2007, um 16:38:27 +0200 mailte dun(at)haisuli(dot)net folgendes:
> Hi,
>
> I'm trying to build an audit system for several tables. My idea was to use
> triggers and plpgsql to record changes made to "important tables" to a
> special audit table. My problem is that I don't want to create a separate
> audit log table for each table that is being monitored. What I would like
> to do is just cast the data from NEW.* or OLD.* to text and insert it into
> a text column. Is this possible? I'm using version 8.1.5.

Why do you want to reinvent the wheel?

http://pgfoundry.org/projects/tablelog/

But it use a separate log-table per table.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ted 2007-02-14 15:17:36 Re: Having a problem with my stored procedure
Previous Message dun 2007-02-14 14:38:27 Cast record as text