Re: How to know a table has been modified?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: How to know a table has been modified?
Дата
Msg-id 20120227.210449.270924732444652188.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: How to know a table has been modified?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: How to know a table has been modified?  (Lennin Caro <lennin.caro@yahoo.com>)
Список pgsql-hackers
>> For TRIGGER, I cannot thinking of any way. Any idea will be
>> welcome.
>  
> It would require creating "cooperating" triggers in the database and
> having a listener, but you might consider the
> triggered_change_notifications() trigger function included in 9.2. 
> It works at least as far back as 9.0; I haven't tried it any further
> back.

Thanks for the info. It's a little bit overkill for my purpose though.
(on busy systems, the notification would be too frequent).

I would think that creating a small routine periodically consults
pg_stat_all_tables view and records the last update datetime for each
table (unfortunately the view does not have last modification date).
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add new keywords SNAPSHOT and TYPES to the keyword list in gram.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: foreign key locks, 2nd attempt