Re: Function To Log Changes

Поиск
Список
Период
Сортировка
Искать
От
Josh Berkus
Тема
Re: Function To Log Changes
Дата
Msg-id
200404051018.26429.josh@agliodbs.com
Ответ на
Список
Дерево обсуждения
Function To Log Changes "Gavin" <gavin@grabias.com>
Re: Function To Log Changes Tom Lane <tgl@sss.pgh.pa.us>
Re: Function To Log Changes Josh Berkus <josh@agliodbs.com>
Re: Function To Log Changes elein <elein@varlena.com>
Re: Function To Log Changes Erik Thiele <erik@thiele-hydraulik.de>
Gavin,

> Hi All, I have been tinkering with a function to log the changes made on
> any column through a function and trigger.  However, I cant think of a way
> to make this work through pl/pgsql.  Any one have any ideas, or is it just
> not possible?

It could be done, but would be extremely slow and awkward using current PL/
pgsql syntax.    You'd have to query the system tables for a list of columns, 
and then execute a series of dynamic queries.

I recommend instead one of the following two approaches:

1) Simply log the whole row of each archived table and don't worry about 
logging the individual columns, or

2) Use PL/tcl, PL/Pyton, or C where you can select columnns by ordinal 
position or other dynamic factor.

-- 
-Josh BerkusAglio Database SolutionsSan Francisco


В списке pgsql-sql по дате отправления
От: abhi
Дата:
От: Gregor Rot
Дата:
Сообщение: Re: order of results
FAQ