Re: Optimizer & boolean syntax

From: Daniele Orlandi <daniele(at)orlandi(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizer & boolean syntax
Date: 2002-11-24 03:27:14
Message-ID: 3DE04712.8070304@orlandi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masaru Sugawara 2002-11-24 04:26:32 Re: quote_ident and schemas (was Re: connectby with schema)
Previous Message Christopher Kings-Lynne 2002-11-23 23:48:25 Help with ADD COLUMN