"Donald Fraser" <postgres@kiwi-fraser.net> writes:
> Is the returned value of a function defined as IMMUTABLE cached =
> globally?
No, in fact it isn't cached at all. IMMUTABLE tells the planner that
it's OK to fold a function call with constant inputs to a constant
result value at plan time. Nothing more.
regards, tom lane