Re: Are cached IMMUTABLE values persistent between sessions

From: "Donald Fraser" <postgres(at)kiwi-fraser(dot)net>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Are cached IMMUTABLE values persistent between sessions
Date: 2005-06-24 09:53:44
Message-ID: 004801c578a2$9cfeb360$6364a8c0@DonAcer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> "Donald Fraser" writes:
>> Is the returned value of a function defined as IMMUTABLE cached =
>> globally?

"Tom Lane" writes:
> 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.

Ok I'm sort of clutching at straws here...
What about this scenario: I'm aware that sql statements within PL/pgSQL
functions get cached. Therefore if the query planner can fold a function with a
constant result, could that query plan get cached by PL/pgSQL with a folded
value?

Regards
Donald Fraser

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message KÖPFERL Robert 2005-06-24 13:18:12 symlinking pg_xlog
Previous Message Hannes Dorbath 2005-06-24 09:47:01 unicode