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

From Mike Mascari
Subject Re: last update time of a table
Date
Msg-id 3FD13796.4050806@mascari.com
Whole thread Raw
In response to Re: last update time of a table  ("pg" <pg@newhonest.com>)
List pgsql-general
pg wrote:

> 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 LISTEN/NOTIFY to do what you want:

http://www.postgresql.org/docs/current/static/sql-listen.html

> -Jason

Mike Mascari
mascarm@mascari.com





pgsql-general by date:

Previous
From: "pg"
Date:
Subject: Re: last update time of a table
Next
From: Karsten Hilbert
Date:
Subject: Re: last update time of a table