"Alex J. Avriette" <alex(at)posixnap(dot)net> writes:
> And if you are concerned about the query's cost vs its actual output
> (you weren't clear in your original message), there is the 'iscachable'
> pragma for functions.
I think that's unrelated to Chris' problem.
One of the reasons we renamed that pragma to "immutable" is that too
many people were interpreting it as suggesting that Postgres would do
some kind of caching of the function's results. There is no such cache.
regards, tom lane