RE: comparing rows

From: Magnus Hagander <mha(at)sollentuna(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: RE: comparing rows
Date: 2000-08-03 14:00:37
Message-ID: 215896B6B5E1CF11BC5600805FFEA82103D97AA7@sirius.edu.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Magnus Hagander <mha(at)sollentuna(dot)net> writes:
> > Summary of MS:
> > When it runs in ANSI mode, null != null.
> > When it runs in backwards compatible mode , null=null.
>
> Oh, that's interesting, they fixed their bug.
>
> foo = NULL should produce NULL (*not* true, and *not* false either,
> though it'd act like false in a CASE test).
Ok.
Hmm. I wonder how I check if it produces NULL :-) If I just do:
SELECT null=null
I get a syntax error. Is there some other way for me to check what it does?
It appears that "null=null" isn't a valid expression (neither is "1=1" or
something like that). Basically, it does not appear to be possible to SELECT
the return value of a comparison at all - and CASE will apparantly not work
in this case. I don't think it's capable of handling anything other than
TRUE/FALSE as the result of a comparison.

//Magnus

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-08-03 14:07:24 Re: comparing rows
Previous Message Tom Lane 2000-08-03 13:55:35 Re: comparing rows