trigger or logging

Поиск
Список
Период
Сортировка
От Jay Vee
Тема trigger or logging
Дата
Msg-id CADq_mb-GkDsuuuQFaXJy=WKd9GuUka7rL2hB5NzNVeYVUpwP3g@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Before running a script (invoked by .sh that will call stored procs which may invoke other triggers), I want to capture every change made in the database which includes the field value before the update and the field value after the update and also capture all inserts.

With this data, I would be able to write a script that would reverse the database to all previous values.

This may be possible with a trigger or a set of triggers but I would need some direction here and to think of all scenarios.

before insert ( capture data that will be inserted ),
if the insert ivokes triggers that insert additional rows or updates rows I would want to capture this.

on any update: trigger to capture the before value and the after value only on the field values that change.

Any help or examples would be greatly appreciated.

J.V.

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

Предыдущее
От: David Noel
Дата:
Сообщение: Re: Small PosgreSQL locking function request - with bounty
Следующее
От: Patrick Dung
Дата:
Сообщение: Re: Major upgrade of PostgreSQL and MySQL