Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54]) by hub.org (8.10.1/8.10.1) with ESMTP id e57DUbW83085 for ; Wed, 7 Jun 2000 09:30:37 -0400 (EDT) Received: from austin.rr.com ([24.93.36.87]) by mail.austin.rr.com with Microsoft SMTPSVC(5.5.1877.357.35); Wed, 7 Jun 2000 08:31:54 -0500 Message-ID: <393E4FCD.1E5D5BC1@austin.rr.com> Date: Wed, 07 Jun 2000 08:36:13 -0500 From: Ed Loehr X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Vincenzo Passoli CC: pgsql-sql@postgresql.org Subject: Re: how to know when a table is altered References: <20000607122417.68160.qmail@hotmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200006/66 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