Re: last update time of a table

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: last update time of a table
Дата
Msg-id 200312050953.56746.dev@archonet.com
обсуждение исходный текст
Ответ на last update time of a table  ("pg" <pg@newhonest.com>)
Список 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 по дате отправления:

Предыдущее
От: Thierry Missimilly
Дата:
Сообщение: Re: What is WAL used for?
Следующее
От: Victor Spång Arthursson
Дата:
Сообщение: how to restart on OS X