Re: Optimizer & boolean syntax

Поиск
Список
Период
Сортировка
От Daniele Orlandi
Тема Re: Optimizer & boolean syntax
Дата
Msg-id 3DE04712.8070304@orlandi.com
обсуждение исходный текст
Ответ на Re: Optimizer & boolean syntax  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
Tom Lane wrote:
> 
> Only two of them are logically equivalent.  Consider NULL.

Ohhh IS NOT TRUE or IS NOT FALSE also match NULL, I never knew this :)

> 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.

Ok, I see your point and the problems that may arise, but I hope wou 
will agree with me that from the point of view of the user, both clauses 
have the same meaning and the index usage should be consistant with it.

Unfortunatelly I don't know very well PostgreSQL internals, so I may be 
saying a load of bullshits, but wouldn't be possible to consider any 
evaluation of a bool expression in the form of bool=bool with true as 
the second 'bool'[1] ? At least as a TODO item ?


Thanks!
Bye!

[1] Eventually including the "var IS TRUE" and "var IS FALSE" (not var 
IS NOT ...) which already are special syntax cases if I am not wrong.

--  Daniele Orlandi Planet Srl



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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Help with ADD COLUMN
Следующее
От: Masaru Sugawara
Дата:
Сообщение: Re: quote_ident and schemas (was Re: connectby with schema)