Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B91269FB434 for ; Tue, 30 Jan 2007 14:58:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 89134-07 for ; Tue, 30 Jan 2007 14:58:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id C9DFF9FB433 for ; Tue, 30 Jan 2007 14:58:45 -0400 (AST) Received: (qmail invoked by alias); 30 Jan 2007 18:58:44 -0000 Received: from ip-90-186-64-240.web.vodafone.de (EHLO colt.pezone.net) [90.186.64.240] by mail.gmx.net (mp047) with SMTP; 30 Jan 2007 19:58:44 +0100 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Re: Differentiate Between Zero-Length String and NULLColumn Values Date: Tue, 30 Jan 2007 19:59:36 +0100 User-Agent: KMail/1.9.5 Cc: "D'Arcy J.M. Cain" , Andrew Sullivan References: <20070130131334.GD31676@phlogiston.dyndns.org> <20070130142332.GA31905@phlogiston.dyndns.org> <20070130113834.fa8d09e0.darcy@druid.net> In-Reply-To: <20070130113834.fa8d09e0.darcy@druid.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701301959.37775.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/166 X-Sequence-Number: 27318 D'Arcy J.M. Cain wrote: > SELECT * FROM table WHERE column IS NULL; > SELECT * FROM table WHERE column = NULL; > > The latter violates the SQL spec and is not allowed by PostgreSQL > without setting a special flag. It doesn't violate any spec and it's certainly allowed by PostgreSQL without any flags. It's just that the result is not what some people expect. -- Peter Eisentraut http://developer.postgresql.org/~petere/