Re: [PERFORM] optimizing immutable vs. stable function calls?

От: Tom Lane
Тема: Re: [PERFORM] optimizing immutable vs. stable function calls?
Дата: ,
Msg-id: 16252.1484781941@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: [PERFORM] optimizing immutable vs. stable function calls?  (Tom Lane)
Ответы: Re: [PERFORM] optimizing immutable vs. stable function calls?  (Karl Czajkowski)
Список: pgsql-performance

Скрыть дерево обсуждения

Re: [PERFORM] optimizing immutable vs. stable function calls?  (Tom Lane, )
 Re: [PERFORM] optimizing immutable vs. stable function calls?  ("David G. Johnston", )
  Re: [PERFORM] optimizing immutable vs. stable function calls?  (Tom Lane, )
   Re: [PERFORM] optimizing immutable vs. stable function calls?  ("David G. Johnston", )
    Re: [PERFORM] optimizing immutable vs. stable function calls?  (Jim Nasby, )
     Re: [PERFORM] optimizing immutable vs. stable function calls?  (Merlin Moncure, )
 Re: [PERFORM] optimizing immutable vs. stable function calls?  (Tom Lane, )
  Re: [PERFORM] optimizing immutable vs. stable function calls?  (Karl Czajkowski, )
 Re: [PERFORM] optimizing immutable vs. stable function calls?  (Karl Czajkowski, )

Karl Czajkowski <> writes:
> Is there a correctness hazard with pretending our function is
> IMMUTABLE, even though we will change the underlying config parameter
> in the same connection?

You could probably get away with that if you never ever use prepared
queries (beware that almost anything in plpgsql is a prepared query).
It's a trick that's likely to bite you eventually though.

            regards, tom lane



В списке pgsql-performance по дате сообщения:

От: Karl Czajkowski
Дата:
Сообщение: Re: [PERFORM] optimizing immutable vs. stable function calls?
От: Clailson
Дата:
Сообщение: [PERFORM] Optimization inner join