Re: Are cached IMMUTABLE values persistent between sessions

Поиск
Список
Период
Сортировка
От Donald Fraser
Тема Re: Are cached IMMUTABLE values persistent between sessions
Дата
Msg-id 004801c578a2$9cfeb360$6364a8c0@DonAcer
обсуждение исходный текст
Ответ на Are cached IMMUTABLE values persistent between sessions  ("Donald Fraser" <postgres@kiwi-fraser.net>)
Список 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


В списке pgsql-admin по дате отправления:

Предыдущее
От: Hannes Dorbath
Дата:
Сообщение: unicode
Следующее
От: KÖPFERL Robert
Дата:
Сообщение: symlinking pg_xlog