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>)
Список pgsql-sql
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
Дата:
Сообщение: Getting the ranks of results from a query
Следующее
От: Gregor Rot
Дата:
Сообщение: Re: order of results