Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D9761634247 for ; Tue, 30 Jun 2009 19:41:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 22848-02 for ; Tue, 30 Jun 2009 19:41:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mail.postgresql.org (Postfix) with ESMTP id C86AB63423D for ; Tue, 30 Jun 2009 19:41:53 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MLm1O-0003b0-GA for pgsql-sql@postgresql.org; Tue, 30 Jun 2009 22:41:50 +0000 Received: from ppp-93-104-71-87.dynamic.mnet-online.de ([93.104.71.87]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jun 2009 22:41:50 +0000 Received: from spam_eater by ppp-93-104-71-87.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jun 2009 22:41:50 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Thomas Kellerer Subject: Re: it's not NULL, then what is it? Date: Wed, 01 Jul 2009 00:41:35 +0200 Lines: 16 Message-ID: References: <4A4A941C.2060604@pinpointresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-93-104-71-87.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <4A4A941C.2060604@pinpointresearch.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/131 X-Sequence-Number: 32736 Steve Crawford wrote on 01.07.2009 00:39: >> canon=# select count(maf) from gallo.sds_seq_reg_shw >> canon-# where maf ISNULL; >> > I believe count will only count not-null Correct SELECT count(some_col) FROM some_table; is the same as SELECT count(*) FROM some_table WHERE some_col IS NOT NULL;