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

From Karsten Hilbert
Subject Re: last update time of a table
Date
Msg-id 20031206031257.C638@hermes.hilbert.loc
Whole thread Raw
In response to Re: last update time of a table  ("pg" <pg@newhonest.com>)
List 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 by date:

Previous
From: Mike Mascari
Date:
Subject: Re: last update time of a table
Next
From: Tom Lane
Date:
Subject: Re: 7.4 Crashed... Why?