From: | John Scott <jmscott(at)yahoo(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, john(at)august(dot)com |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: not null - trivial, unexpected behavior |
Date: | 2001-06-16 23:26:07 |
Message-ID: | 20010616232607.5720.qmail@web10007.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
--- Josh Berkus <josh(at)agliodbs(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-06-16 23:52:06 | Re: not null - trivial, unexpected behavior |
Previous Message | Josh Berkus | 2001-06-16 22:23:23 | Re: not null - trivial, unexpected behavior |