storing long live parameters - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject storing long live parameters
Date
Msg-id 20080506150711.2a1ee38f@dawn.webthatworks.it
Whole thread Raw
List pgsql-general
I've some nearly static tables that store id that comes handy as
"constant".
I'd like to keep maintenance as low as possible and still avoid to
execute selects looking for the current value of a certain ID.

eg. I may have stages of a process stored in a table, that table is
not going to change often but still it may change.
I'd like to use the id of the last stage across functions without
calling

select into maxid max(id) from stages;

and still have a standard procedure that will update all such
"constants".

One awkward way could be to define functions as immutable even if
they are not and refresh their values cycles of "create or
replace"... if they actually get refreshed... but I'd like to see if
there are other options.

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: "Scott Miller"
Date:
Subject: Re: Feature request
Next
From: Daniel Schuchardt
Date:
Subject: Re: Autocast script of peter e in PostgreSQL 8.3