Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group