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

Re: '= NULL' is not the same as 'IS NULL'

From: Mark Morgan Lloyd <markMLl(dot)pgsql-odbc(at)telemetry(dot)co(dot)uk>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: '= NULL' is not the same as 'IS NULL'
Date: 2006-09-06 20:40:50
Message-ID: 44FF3252.8F6A978B@telemetry.co.uk (view raw or flat)
Thread:
Lists: pgsql-odbc
Geert Janssens wrote:

> I tried this query directly in phpPgSQL, and indeed it returns no results. On
> the other hand, if I modify "imgname" = NULL to "imgname" IS NULL, the query
> works fine.
[...]
> Has anybody else stumbled upon this issue ?

I'm afraid so, in Joe Celko's "SQL for Smarties" book, after which I simply
accepted that that was the way SQL worked. He also comments on the IS TRUE etc.
form which I see PostgreSQL now supports, also in the relevant section of the
manual I see IS DISTINCT FROM which might help.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

In response to

Responses

pgsql-odbc by date

Next:From: Richard Broersma JrDate: 2006-09-06 20:56:32
Subject: Re: '= NULL' is not the same as 'IS NULL'
Previous:From: Dave PageDate: 2006-09-06 18:55:29
Subject: Re: v08.02.0100 uploaded

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