Re: last update time of a table

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: last update time of a table
Дата
Msg-id 20031206031257.C638@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: last update time of a table  ("pg" <pg@newhonest.com>)
Список pgsql-general
> In fact, I only need to decide whether a table (the whole) has been updated
> since last query. I have some pulldown menus in a VB app which extract data
> from a remote site with slow connection. And the data in those tables for
> pulldowns changes rarely. So if the pulldown has to extract the data and
> transmit it thru slow connection, the pulldown will take a few seconds to be
> in action, which is a little bit annoying, especially if the data is the
> same as in the array of client. So if I can query the table, knowing that no
> data changed in the table since my last query, I can use the client side
> array as pulldown data without waiting for long transmition time.
>
> I wonder if there is some more direct method, or thru the pg system tables
> to get this info. If there's not out there, I would use a trigger which will
> update a seperate table containing the last update time of all tables (not
> records) for pulldowns.

You can use NOTIFY/LISTEN with triggers on
update/delete/insert.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

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

Предыдущее
От: Mike Mascari
Дата:
Сообщение: Re: last update time of a table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.4 Crashed... Why?