From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | "Pilling, Michael" <Michael(dot)Pilling(at)dsto(dot)defence(dot)gov(dot)au> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED] |
Date: | 2011-11-30 03:53:39 |
Message-ID: | 201111300353.pAU3rdp29050@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Pilling, Michael wrote:
> Hi Kevin,
>
> Thanks for that. Point entirely taken. I think what I would add would
> be in the table 9-1 of operators, an extra column filled in only for
> =, <> and != saying Important: see difference from IS [NOT] NULL.
> Perhaps one reason I didn't pick up on this subtle issue is that IS
> NULL and IS NOT NULL are not listed in this table but they are
> comparison operators, just textual rather than symbolic ones in the
> grammar so they should be in the table. I recall specifically looking
> up what is the not equal operator in this language and only going
> forward from the table, not realising I had to read any further.
>
> I'd also add after "Do not write expression = NULL because NULL is not
> "equal to" NULL." Do not write expression != NULL or <> NULL because
> NULL is not "not equal to" NULL. because while implied, it's not
> obvious that because = doesn't work with NULL that != doesn't either.
I have written the attached patch to mention <> NULL also returns NULL.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/null | text/x-diff | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rural Hunter | 2011-11-30 08:27:05 | Re: transaction error handling |
Previous Message | Bruce Momjian | 2011-11-30 02:32:42 | Re: BUG #6067: In PL/pgsql, EXISTS(SELECT ... INTO...) fails |