Re: How to log whole query statement to relation?

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: How to log whole query statement to relation?
Дата
Msg-id 20070424113530.GL11053@a-kretschmer.de
обсуждение исходный текст
Ответ на Re: How to log whole query statement to relation?  (David Flegl <ml_flegl@centrum.cz>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: David Flegl
Дата:
Сообщение: Re: How to log whole query statement to relation?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to log whole query statement to relation?