Re: Performance problem in textanycat/anytextcat

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance problem in textanycat/anytextcat
Дата
Msg-id 2831.1274061609@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Performance problem in textanycat/anytextcat  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I guess my point is that the actual volatility of an expression is
> presumably independent of whether it gets inlined.  (If inlining is
> changing the semantics, that's a problem.)  So if inlining is changing
> it's apparent volatility, then there's something wrong with the way
> we're computing apparent volatility.  No?

Well, the way we're computing volatility is certainly an
oversimplification of reality, as was already noted upthread --- the
fundamental issue here is that polymorphism of the textcat functions
renders it impossible to know their true volatility status without
knowing the specific datatype they're being applied to.  Perhaps we
could generalize the pg_proc representation to accommodate that, but
it's certainly in the nature of a research project.  And there are
*many* cases where we're already approximating for other reasons; the
timestamptz plus interval case that I mentioned earlier is one.  So long
as any approximations are in the direction of supposing the expression
is more volatile than it really is, they are not dangerous.  But right
at the moment, the textcat functions are on the wrong side of that,
because they're claiming to be immutable when they sometimes aren't.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_upgrade and extra_float_digits
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Sort of a planner regression 8.3->8.4 (due to EXISTS inlining) and related stuff