Re: last update time of a table

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: pg <pg(at)newhonest(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: last update time of a table
Date: 2003-12-06 01:57:42
Message-ID: 3FD13796.4050806@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mascari(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2003-12-06 02:12:57 Re: last update time of a table
Previous Message pg 2003-12-06 01:45:10 Re: last update time of a table