From: John Scott <jmscott@yahoo.com>
To: Josh Berkus <josh@agliodbs.com>
To: Peter Eisentraut <peter_e@gmx.net>
To: john@august.com
Cc: pgsql-sql@postgresql.org
Subject: Re: not null - trivial, unexpected behavior
Date: Sat, 16 Jun 2001 16:26:07 -0700 (PDT)
Message-ID: <20010616232607.5720.qmail@web10007.mail.yahoo.com> (raw)
In-Reply-To: <web-72914@davinci.ethosmedia.com>
--- Josh Berkus <josh@agliodbs.com> wrote:
> Peter,
>
> > Correction: Each Boolean expression can have one of *three* values:
> > true,
> > false, unknown (null). So those two sets will not be "complimentary"
> > in
> > the traditional sense because both expressions _should_ (modulo the
> > information I pointed you to) return "unknown".
>
> I agree pretty strongly with Peter here ... the " = NULL " functionality
> should go. I've already had to re-examine some of my functions for
> unexpected results due to = NULL possibly evaluating to TRUE, an outcome
> for which I did not plan.
>
> Plus it leads those new to SQL92 into trouble, as it did with John :-)
>
> -Josh Berkus
not a showstopper for me.
but, as i understand the sql92 standard, both att = null and att != null
are NOT sql92. perhaps they're just remnants of the Cish nature of quel.
seems to me that if att != null is unknown, then att = null
should be unknown as well. or at least documented as such.
a practical example of where this becomes a problem
is a query like
select * from t where a != :aqual
to do this properly for a null 'aqual' in sql92 i need to change '=' to
'is not null', which is considerably more complex than simple variable
substitution.
i guess a summary question would be : is a predicate like
"att = null" even predicatable and, if not,
why should any unpredicatble query
be accepted by the database engine?
-j
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jmscott@yahoo.com, josh@agliodbs.com, peter_e@gmx.net, john@august.com
Subject: Re: not null - trivial, unexpected behavior
In-Reply-To: <20010616232607.5720.qmail@web10007.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox