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