Re: Coalesce bug ?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Coalesce bug ?
Дата
Msg-id CAPTjJmpOS-oOq6pHyxiNb-p_vz0Yz9iLRe6m=WXqoVtEum=UNQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Coalesce bug ?  ("jg" <jg@rilk.com>)
Ответы Re: Coalesce bug ?
Список pgsql-general
On Sat, Dec 22, 2012 at 2:57 AM, jg <jg@rilk.com> wrote:
> Hi,
>
> Interesting idea.
> With VOLATILE, the bug disappears.
> With IMMUTABLE, the EXPLAIN and the execution does not match !!!!
> That is a bug. Even if the behavior has to be different in VOLATILE and IMMUTABLE, the EXPLAIN and the execution MUST
becoherent. 
> JG

Just a word about your wording. Calling this a bug is somewhat poor
form; you're sounding hostile and accusatory, rather than looking to
learn and understand. It might indeed turn out to be a bug, but from
what else has happened in this thread, I'm more inclined to think that
the database is fine and your code is what's not working.

http://www.catb.org/esr/faqs/smart-questions.html#idp29846432

It's almost as if he read this very thread :)

Something to consider: Since you've told Postgres that your function
is immutable, it might be remembering the result from the first
execution and using it in the second. Try restarting the server
between the EXPLAIN and the test.

By the way, why do you declare your functions as "STRICT IMMUTABLE"
and "STRICT VOLATILE"?

ChrisA


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Coalesce bug ?