X-POP3-Server: Host ([mail.hitechroboticsystemz.com]) 	by hitechgears.com (PostMaster POP3 Login [hrs@hitechroboticsystemz.com] [192.168.0.25]); 	Sun, 26 Jun 2011 21:42:11 +0530
Return-Path: <pgsql-general-owner+m177209@postgresql.org>
Received: from mx2.hub.org [200.46.204.254] by dr178.cyberspaceindia.com with SMTP;
   Sun, 26 Jun 2011 21:36:17 +0530
Received: from postgresql.org (mail.postgresql.org [200.46.204.86])
	by mx2.hub.org (Postfix) with ESMTP id CD0FB1753C29;
	Sun, 26 Jun 2011 13:06:09 -0300 (ADT)
Received: from maia.hub.org (maia-3.hub.org [200.46.204.243])
	by mail.postgresql.org (Postfix) with ESMTP id 9E272B5DBCB
	for <pgsql-general-postgresql.org@mail.postgresql.org>; Sun, 26 Jun 2011 13:05:36 -0300 (ADT)
Received: from mail.postgresql.org ([200.46.204.86])
 by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024)
 with ESMTP id 27701-05
 for <pgsql-general-postgresql.org@mail.postgresql.org>;
 Sun, 26 Jun 2011 16:05:30 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51])
	by mail.postgresql.org (Postfix) with ESMTP id A0E67B5DBD5
	for <pgsql-general@postgresql.org>; Sun, 26 Jun 2011 13:05:30 -0300 (ADT)
Received: by tamriel.snowman.net (Postfix, from userid 1000)
	id 57EE322972; Sun, 26 Jun 2011 12:05:29 -0400 (EDT)
Date: Sun, 26 Jun 2011 12:05:29 -0400
From: Stephen Frost <sfrost@snowman.net>
To: Vincent Veyron <vv.lists@wanadoo.fr>
Cc: Darren Duncan <darren@darrenduncan.net>,
	Michael Nolan <htfoot@gmail.com>, pgsql-general@postgresql.org
Subject: Re: [GENERAL] An amusing MySQL weakness--not!
Message-ID: <20110626160529.GL32313@tamriel.snowman.net>
References: <BANLkTikAj1YO7Vzz5wYpLt5PvodbSwF6nw@mail.gmail.com>
 <4E06DA56.8030905@darrenduncan.net>
 <1309097466.2381.13.camel@asus-1001PX.home>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="Bzq2cJcN05fcPrs+"
Content-Disposition: inline
In-Reply-To: <1309097466.2381.13.camel@asus-1001PX.home>
X-Editor: Vim http://www.vim.org/
X-Info: http://www.snowman.net
X-Operating-System: Linux/2.6.32-5-amd64 (x86_64)
X-Uptime: 12:03:44 up 144 days, 33 min, 19 users,  load average: 0.02,
 0.06, 0.06
User-Agent: Mutt/1.5.20 (2009-06-14)
X-Virus-Scanned: Maia Mailguard 1.0.1
X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9,
 T_RP_MATCHES_RCVD=-0.01
X-Spam-Level: 
X-Mailing-List: pgsql-general
List-Archive: <http://archives.postgresql.org/pgsql-general>
List-Help: <mailto:majordomo@postgresql.org?body=help>
List-ID: <pgsql-general.postgresql.org>
List-Owner: <mailto:pgsql-general-owner@postgresql.org>
List-Post: <mailto:pgsql-general@postgresql.org>
List-Subscribe: <mailto:majordomo@postgresql.org?body=sub%20pgsql-general>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Precedence: bulk
Sender: pgsql-general-owner@postgresql.org
X-Declude-Sender: pgsql-general-owner+m177209@postgresql.org [200.46.204.254]
X-Declude-Spoolname: 42284596.eml
X-Declude-RefID: str=0001.0A090208.4E075900.011D:SCGSTAT706138,ss=1,fgs=1024
X-Declude-Note: Scanned by Declude 4.10.72 "http://www.declude.com/x-note.htm"
X-Declude-Scan: Incoming Score [6] at 21:36:28 on 26 Jun 2011
X-Declude-Tests: SORBS-RECENT [3], NOABUSE [2], ROUTING [4], FROMNOMATCH [2], HAM-INDICATOR [-8], FILTER-SUBJECT [6]
X-Country-Chain: UNITED STATES->PANAMA->destination
X-Declude-Code: 2000011f
X-HELO: mx2.hub.org
X-Identity: 200.46.204.254 | mx2.hub.org | postgresql.org
X-Rcpt-To: <anisha.kaul@hitechroboticsystemz.com>
X-SmarterMail-Spam: Declude: 6
X-SmarterMail-TotalSpamWeight: 6

--Bzq2cJcN05fcPrs+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

* Vincent Veyron (vv.lists@wanadoo.fr) wrote:
> Would you mind giving an example of where a boolean field would be a win
> over an integer one?

Where you only ever want 2 (or perhaps 2+NULL) values allowed for the
column.  It's about domain, consistency, etc, primairly.  That said,
don't we implement boolean fields using a bitmap similar to NULLs?  In
which case, it would likely be smaller on disk and more performant as
well.

> I'm asking this because I frequently wonder what is best for my use; I
> normally query postgres via Perl modules, which don't care about boolean
> (the driver converts t/f to 0/1), but I like to tune my fields properly.

Yes, which is pretty horrible of it, imo.

	Thanks,

		Stephen

--Bzq2cJcN05fcPrs+
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk4HWMkACgkQrzgMPqB3kiihbwCeN2zFnYL+UJkUCyfqcLZJVd3q
/L4An2aD7igAi7hKSuw2ejcX3nEQXKOK
=Xq6B
-----END PGP SIGNATURE-----

--Bzq2cJcN05fcPrs+--
