X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 098A09FB3B6 for ; Wed, 6 Sep 2006 17:41:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 48096-04 for ; Wed, 6 Sep 2006 20:41:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pye-srv-01.telemetry.co.uk (kdgmtbu.demon.co.uk [194.222.45.178]) by postgresql.org (Postfix) with ESMTP id 0D7029FB3B4 for ; Wed, 6 Sep 2006 17:40:54 -0300 (ADT) Received: from pye-srv-01.telemetry.co.uk (IDENT:2@localhost [127.0.0.1]) by pye-srv-01.telemetry.co.uk (8.12.4/8.12.4) with ESMTP id k86KeqDq009176 for ; Wed, 6 Sep 2006 20:40:52 GMT Received: (from daemon@localhost) by pye-srv-01.telemetry.co.uk (8.12.4/8.12.4/Submit) id k86Keq8U009175; Wed, 6 Sep 2006 20:40:52 GMT From: Mark Morgan Lloyd Subject: Re: '= NULL' is not the same as 'IS NULL' Date: Wed, 06 Sep 2006 20:40:50 +0000 Organization: KDG Telemetry Message-ID: <44FF3252.8F6A978B@telemetry.co.uk> References: <200609061555.13070.info@kobaltwit.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/44 X-Sequence-Number: 8195 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]