check the log of postgresql, there you can take the table name and the date of 
the modification

Ing. Lennin Caro Pérez


PHP Developer

PostgreSQL DBA

Oracle DBA

Linux  counter id 474393

--- On Mon, 2/27/12, Tatsuo Ishii <> wrote:

From: Tatsuo Ishii <>
Subject: Re: [HACKERS] How to know a table has been modified?
Date: Monday, February 27, 2012, 12:04 PM

>> 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

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to