X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 6C2F3924EC9 for ; Fri, 23 May 2003 05:21:29 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 77365-06 for ; Fri, 23 May 2003 05:20:49 -0400 (EDT) Received: from elit.ci.net.ua (elit.ci.net.ua [212.86.96.11]) by developer.postgresql.org (Postfix) with ESMTP id BCE95925F6B for ; Fri, 23 May 2003 02:55:13 -0400 (EDT) Received: (from uucp@localhost) by elit.ci.net.ua (8.11.6/8.11.5) with UUCP id h4N6u6e17640 for pgsql-sql@postgresql.org; Fri, 23 May 2003 09:56:06 +0300 (EEST) X-Spam-Filter: check_local@elit.ci.net.ua by digitalanswers.org Received: from localhost (localhost.localdomain [127.0.0.1]) by kpgaz.chernigov.ua (Postfix) with SMTP id 082C119487 for ; Fri, 23 May 2003 08:51:46 +0300 (EEST) Received: from there (develop.kpgaz2 [192.168.20.13]) by kpgaz.chernigov.ua (Postfix) with SMTP id 7929619327 for ; Fri, 23 May 2003 08:51:46 +0300 (EEST) Content-Type: text/plain; charset="koi8-u" From: Alexey Dashevsky To: pgsql-sql@postgresql.org Subject: Re: numeric fields and null Date: Fri, 23 May 2003 08:51:49 +0300 X-Mailer: KMail [version 1.3.1] References: <20030522152454.P46888-100000@megazone23.bigpanda.com> In-Reply-To: <20030522152454.P46888-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20030523055146.7929619327@kpgaz.chernigov.ua> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/453 X-Sequence-Number: 13618 > > adhoc=# update users set postaladdressid=null where id=50; > > UPDATE 1 > > > > adhoc=# select id,postaladdressid from users where postaladdressid=null; > > id | postaladdressid > > ----+----------------- > > (0 rows) > > > > Why did it not select record 50? > > Because NULL=NULL is not true (it's unknown). Use IS NULL if you want to > see if something is NULL. If in postgresql.conf set parameter transform_null_equals=TRUE ????