Skip site navigation (1) Skip section navigation (2)

Re: An amusing MySQL weakness--not!

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
Cc: Darren Duncan <darren(at)darrenduncan(dot)net>,Michael Nolan <htfoot(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: An amusing MySQL weakness--not!
Date: 2011-06-26 16:05:29
Message-ID: 20110626160529.GL32313@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-general
* Vincent Veyron (vv(dot)lists(at)wanadoo(dot)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

In response to

Responses

pgsql-general by date

Next:From: sfrostDate: 2011-06-26 16:12:11
Subject: Re: An amusing MySQL weakness--not!
Previous:From: Tom LaneDate: 2011-06-26 15:11:44
Subject: Re: Reusing cached prepared statement slow after 5 executions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group