Re: how to know when a table is altered

Поиск
Список
Период
Сортировка
От Ed Loehr
Тема Re: how to know when a table is altered
Дата
Msg-id 393E4FCD.1E5D5BC1@austin.rr.com
обсуждение исходный текст
Ответ на how to know when a table is altered  ("Vincenzo Passoli" <maweb@hotmail.com>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Frank G Hahn
Дата:
Сообщение: Re: sql doubts
Следующее
От: mikeo
Дата:
Сообщение: Re: oracle rownum equivalent?