Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id C53FF9FB3C0 for ; Tue, 30 Jan 2007 12:55:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 58024-05 for ; Tue, 30 Jan 2007 12:55:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 7DE1C9FB3DA for ; Tue, 30 Jan 2007 12:55:13 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HBwR9-0002HW-TA for pgsql-sql@postgresql.org; Tue, 30 Jan 2007 12:06:28 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 93CDE41A2; Tue, 30 Jan 2007 11:55:03 -0500 (EST) Date: Tue, 30 Jan 2007 11:55:03 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Differentiate Between Zero-Length String and NULLColumn Values Message-ID: <20070130165503.GC32170@phlogiston.dyndns.org> References: <20070130131334.GD31676@phlogiston.dyndns.org> <45BF584F.A3DD.0030.0@indicator.be> <20070130142332.GA31905@phlogiston.dyndns.org> <20070130113834.fa8d09e0.darcy@druid.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070130113834.fa8d09e0.darcy@druid.net> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/161 X-Sequence-Number: 27313 On Tue, Jan 30, 2007 at 11:38:34AM -0500, D'Arcy J.M. Cain wrote: > I don't have an Oracle installation here and I haven't used it much but > I wonder if they treat the following two statements differently. > > SELECT * FROM table WHERE column IS NULL; > SELECT * FROM table WHERE column = NULL; AFAIK they don't accept the latter any more than we do. But again, I'm an Oracle ignoramous. I _do_ know that people of my acquaintance who have historically only developed against Oracle have given me queries with things like value = '' in it, and been surprised. Or at least, I think it's like that. I do recall hearing a lot about how stupid Postgres was because it didn't like something that worked "perfectly well" on Oracle, which I was assured was the most SQL-compliant system on the planet. Happily, I no longer work with any of those people :) A -- Andrew Sullivan | ajs@crankycanuck.ca "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler