Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 84A576333ED for ; Tue, 30 Jun 2009 19:24:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 01937-08 for ; Tue, 30 Jun 2009 19:24:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by mail.postgresql.org (Postfix) with ESMTP id 9A033632BBF for ; Tue, 30 Jun 2009 19:24:23 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 28so180225wfc.28 for ; Tue, 30 Jun 2009 15:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=bTIm4kEPsxVq8BgShvZ+rZMrdO8fAi7PKD5V5Mehtpw=; b=DjabGQTGEX3MvgbwXWnrIy30/GM6a01dW8UbWYLRlh61udEH4Gqk/gDJ6KvUPPmOG5 x+7ECdFgh4DfurTY8dMDX1PLnQOdhx9AEsEgNHtVxat35qABVQKcj+YGZWkz+7/4z80d c3EiKsOiPLtIjUPCqEkl2GE5Flfm2SOyrwEa4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=EnyIbCnfNAsYL7rdi7evUziWUjUgn8HIfz+NDuPAZPjnoupEOUkRfKOfA/UzHW9+rP H3NA9ksv+bTnSzfRSIV5a3MK2m6RkWbuTh3/07uwPZaYCba0yCkubrM2G2op9QrHvGs9 QEshLAVnES2k6DItgqBEd/MtvVDMxQFGMoceQ= Received: by 10.142.170.20 with SMTP id s20mr214099wfe.137.1246400662086; Tue, 30 Jun 2009 15:24:22 -0700 (PDT) Received: from ?192.168.48.102? ([208.187.158.93]) by mx.google.com with ESMTPS id 30sm1673140wfd.3.2009.06.30.15.24.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Jun 2009 15:24:21 -0700 (PDT) Message-ID: <4A4A908B.1080607@gmail.com> Date: Tue, 30 Jun 2009 16:24:11 -0600 From: Rob Sargent User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Tena Sakai CC: pgsql-sql@postgresql.org Subject: Re: it's not NULL, then what is it? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/128 X-Sequence-Number: 32733 Tena Sakai wrote: > > Hi Everybody, > > I have a table called gallo.sds_seq_reg_shw, > which is like: > > canon=# \d gallo.sds_seq_reg_shw > Table "gallo.sds_seq_reg_shw" > Column | Type | Modifiers > ------------------+---------+----------- > name | text | > response | text | > n | integer | > source | text | > test | text | > ref | text | > value | real | > pvalue.term | real | > stars.term | text | > gtclass.test | text | > fclass.test | text | > gtclass.ref | text | > fclass.ref | text | > markerid | integer | > maf | real | > chromosome | text | > physicalposition | integer | > id | text | > ctrast | text | > > I am intereseted in the column maf (which is real): > > canon=# select maf from gallo.sds_seq_reg_shw > canon-# order by maf asc; > maf > ------------- > 0.000659631 > 0.000659631 > 0.000659631 > 0.000659631 > . > (trunacated for the interest of breivity) > . > > Another way to look at this column is: > > canon=# select maf from gallo.sds_seq_reg_shw > canon-# order by maf desc; > maf > ------------- > > > > . > (trunacated for the interest of breivity) > . > > These rows shown are blanks, as far as I can tell. > But... > > canon=# select count(maf) from gallo.sds_seq_reg_shw; > count > ------- > 67284 > (1 row) > > canon=# select count(maf) from gallo.sds_seq_reg_shw > canon-# where maf ISNULL; > count > ------- > 0 > (1 row) > > canon=# > canon=# select count(maf) from gallo.sds_seq_reg_shw > canon-# where maf NOTNULL; > count > ------- > 67284 > (1 row) > > My confusion is that if they are real and not null, > what are they? How would I construct a query to do > something like: > > select count(maf) > from gallo.sds_seq_reg_shw > where maf ISBLANK; > > Thank you in advance. > > Regards, > > Tena Sakai > tsakai@gallo.ucsf.edu > Maybe something like select ']' || maf::text || '[' -- just to see where the value start/stops or select length(maf::text) but I suspect you're getting NAN or something unprintable in your environment?