Re: BUG #7651: Superfluous calls to functions used for indexing

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: BUG #7651: Superfluous calls to functions used for indexing
Дата
Msg-id 1353019478.14335.23.camel@sussancws0025
обсуждение исходный текст
Ответ на BUG #7651: Superfluous calls to functions used for indexing  (m-pg@8d.no)
Ответы Re: BUG #7651: Superfluous calls to functions used for indexing  (Morten Minde Neergaard <m@8d.no>)
Список pgsql-bugs
On Sun, 2012-11-11 at 15:45 +0000, m-pg@8d.no wrote:
> Bug: When making an index over a function, then selecting a result that does
> not contain the function call (but orders on it), Superfluous function calls
> are made. This possibly because the plan creates a projection containing the
> function value.

It's possible that the function call may be unnecessary, but that is
more of a performance enhancement, not a bug.

Also, the example function has side effects. If you declare functions
with side effects to be IMMUTABLE, you can get all kinds of problems.
You should certainly not rely on an IMMUTABLE function to be called a
specific number of times.

Regards,
    Jeff Davis

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7662: INSERT rule doesn't work as expected
Следующее
От: chenhj@cn.fujitsu.com
Дата:
Сообщение: BUG #7664: Program using libpq and ecpglib can not output native language