| От | Louis-David Mitterrand |
|---|---|
| Тема | strategies for keeping an audit trail of UPDATEs |
| Дата | |
| Msg-id | 20010220182707.A2422@apartia.ch обсуждение |
| Список | pgsql-general |
Hello,
In our app we must keep a trace of all changes (UPDATEs) done to an
important_table, so that it's possible to get a snapshot of a given
record at a given date.
The implementation strategy we are thinking about:
1. create an important_table_archive which inherits from
important_table,
2. create a trigger ON UPDATE of important_table which automatically
creates a record in important_table_archive containing only the UPDATEd
fields on the original record along with the modification date and
author and the primary key,
Is this a viable strategy for that kind of requirement? Is there a
better, more orthodox one?
Thanks in advance,
--
PANOPE: D�j� m�me Hippolyte est tout pr�t � partir ;
Et l'on craint, s'il para�t dans ce nouvel orage,
Qu'il n'entra�ne apr�s lui tout un peuple volage.
(Ph�dre, J-B Racine, acte 1, sc�ne 4)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера