X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A634752EDC for ; Sat, 20 Aug 2005 23:26:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41729-04 for ; Sun, 21 Aug 2005 02:25:55 +0000 (GMT) Received: from web35204.mail.mud.yahoo.com (web35204.mail.mud.yahoo.com [66.163.179.83]) by svr1.postgresql.org (Postfix) with SMTP id D1BC252DE2 for ; Sat, 20 Aug 2005 23:25:54 -0300 (ADT) Received: (qmail 21503 invoked by uid 60001); 21 Aug 2005 02:25:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=TVGkPy30IHWLule3Ewb98gJT9/diJ/SxKr/LYeWDkTxeNYR3XrSA9Os3+EkeQj7PX+sRghFBQZDIfgqqVVv0mZZeQyrysb3NwADT+9KrB0a+oS/qpkxjJBGiAAsIevT2TUw/2ablXhPBBSkFvRBblmKy3R3No7nPu+wna9GzmnA= ; Message-ID: <20050821022557.21501.qmail@web35204.mail.mud.yahoo.com> Received: from [70.104.144.58] by web35204.mail.mud.yahoo.com via HTTP; Sat, 20 Aug 2005 19:25:57 PDT Date: Sat, 20 Aug 2005 19:25:57 -0700 (PDT) From: "Matt L." Subject: booleans and nulls To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374] X-Spam-Level: X-Archive-Number: 200508/252 X-Sequence-Number: 22480 Out of curiousity, 1. Does a boolean column occupy 1byte of disk whether or not the value is null or not? 2. Is matching on IS NULL or = 0 more efficient? 3. If I ix'd columns w/ null does postgres know whatevers not indexed is null or would their be no point? I currently utilize null fields as 'not a value' has meaning in a program i've been working on as I don't want to put false in every column when i only need a couple with a true/false value. I'm not joining tables on NULLS, just filtering w/ them. Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com