From: Ed Loehr <eloehr@austin.rr.com>
To: Vincenzo Passoli <maweb@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: how to know when a table is altered
Date: Wed, 07 Jun 2000 08:36:13 -0500
Message-ID: <393E4FCD.1E5D5BC1@austin.rr.com> (raw)
References: <20000607122417.68160.qmail@hotmail.com>
Vincenzo Passoli wrote:
>
> i'm developing a framework (mod_perl+apache) that reads the db-schema and
> explode html forms.
>
> now i read the schema and cache it into perl-hashes to speedup things.
>
> my problem is to recognise when a table is altered so that the framework can
> update the related forms connected to the db tables.
> i don't want to read the schema every time.
>
> How can i implement this ?
My sub-optimal approach was to cache all of the generally static tables
(requiring a restart to reload them if they changed), and query the
rest. You can avoid a lot of joins by querying the db for the foreign
keys to static tables and then looking them up only in the app cache.
But caching query results and invalidating them when the underlying
tables changed would greatly simplify my app and speed things up, so I'd
love to hear if others have a better/faster solution here.
Regards,
Ed Loehr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: eloehr@austin.rr.com, maweb@hotmail.com
Subject: Re: how to know when a table is altered
In-Reply-To: <393E4FCD.1E5D5BC1@austin.rr.com>
References: <20000607122417.68160.qmail@hotmail.com> <393E4FCD.1E5D5BC1@austin.rr.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox