Re: last update time of a table - Mailing list pgsql-general

From Richard Huxton
Subject Re: last update time of a table
Date
Msg-id 200312050953.56746.dev@archonet.com
Whole thread Raw
In response to last update time of a table  ("pg" <pg@newhonest.com>)
List pgsql-general
On Friday 05 December 2003 01:21, pg wrote:
> Is there any simple way to query the most recent time of "changes" made to
> a table?
>
> I'm accessing my database with ODBC to a remote site thru internet. I want
> to eliminate some DUPLICATE long queries by evaluating whether the data has
> been
> changed since last query. What should I do?

The canonical way is to add a last_changed column and a trigger to make sure
it gets updated whenever the rest of the row is.

Go over to http://techdocs.postgresql.org/ and check in the plpgsql cookbook
or my Postgresql notes, or the archives come to think of it.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Thierry Missimilly
Date:
Subject: Re: What is WAL used for?
Next
From: Victor Spång Arthursson
Date:
Subject: how to restart on OS X