Re: Optimizer & boolean syntax

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizer & boolean syntax
Дата
Msg-id 19807.1037933455@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimizer & boolean syntax  (Daniele Orlandi <daniele@orlandi.com>)
Список pgsql-hackers
Daniele Orlandi <daniele@orlandi.com> writes:
> The problem is the opposite... so, effectively, seems that the optimizer 
> considers "monitored" and "monitored=true" as two different expressions...

Check.

> The viceversa is analog and we also can see that the syntax "monitored 
> is true" is considered different from the other two syntaxes:

As it should be.

> What I propose is that all those syntaxes are made equivalent

Only two of them are logically equivalent.  Consider NULL.

Even for the first two, assuming equivalence requires hard-wiring an
assumption about the behavior of the "bool = bool" operator; which is
a user-redefinable operator.  I'm not totally comfortable with the idea.
        regards, tom lane


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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: bug in pg_dumpall 7.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bug in pg_dumpall 7.3