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

Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED]

From: "Pilling, Michael" <Michael(dot)Pilling(at)dsto(dot)defence(dot)gov(dot)au>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, <craig(at)postnewspapers(dot)com(dot)au>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED]
Date: 2011-06-20 00:30:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
>> The real problem here then is that the documentation showing
>> the boolean comparison operators does not mention this
> This page does, at length:

But not in the table, in fact it doesn't even mention the IS NULL, IS NOT NULL operators at all.
>What page are you looking at?
I was looking at that page but didn't read the detail because I thought the information was in the 
table and the detail was just textual examples. In so much of the documentation, the rest of the page
just writes out in long hand what can be inferred from the syntax. People do not read online like a book,
they scan. If the information is not upfront it just won't be seen.
>> And indeed the parser does not generate warnings either.
>It would be totally wrong for the parser to generate warnings about
>correct behavior.

The behaviour of the generated code may well be correct and indeed I agree that it is but from 
everything you and the detailed documentation have said column != NULL is at least deprecated 
and is highly likely to indicate a programming error. It is totally normal for a parser to warn 
against archaic or dangerous constructs. The idea being to avoid subtle runtime bugs that are
hard to track down. This happens in Ada, Java and even C and many other languages.


IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email.

In response to


pgsql-bugs by date

Next:From: Craig RingerDate: 2011-06-20 00:35:10
Subject: Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED]
Previous:From: Pilling, MichaelDate: 2011-06-20 00:15:57
Subject: Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED]

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