Re: How to log whole query statement to relation?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to log whole query statement to relation?
Date: 2007-04-24 11:35:30
Message-ID: 20070424113530.GL11053@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

am Tue, dem 24.04.2007, um 13:13:50 +0200 mailte David Flegl folgendes:
> Hi,
> > I think, you can't do log the sql as text, but you can tools like
> > 'tablelog' to obtain a similar behavior:
>
> thank's for inspiration.
>
> And another question. Is it possible to parse record type NEW? How could
> one do something like (in trigger where new is set up):
> text_var:=to_char(NEW)
> So if NEW.at1='test' and NEW.at2=100 I will get string: 'test',100
> But the problem is then if trigger is generally used for many tables, I
> don't know number of elements and so on.

Not that i know, at least in plpgsql. Perhaps with languages like
pl/perl or in plain C, but i'm not sure.

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

Browse pgsql-novice by date

  From Date Subject
Next Message Greg Lindstrom 2007-04-24 14:29:15 File I/O
Previous Message David Flegl 2007-04-24 11:13:50 Re: How to log whole query statement to relation?