Re: single bit integer (TINYINT) revisited for 8.5

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Caleb Cushing" <xenoterracide(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: single bit integer (TINYINT) revisited for 8.5
Date: 2009-07-01 15:41:18
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Caleb Cushing <xenoterracide(at)gmail(dot)com> wrote:

> most (if not all?) of posgresql's major competitor's (mysql, sql
> server, db2, etc) support a single bit integer datatype.

> A couple of times I've been told "you don't need tinyint, use
> boolean" which is not true, several projects I've worked on I've
> needed and integer field that supports number within a small range
> 0-5 1-10 1-100 or something similar.

I think you mean byte where you've said bit. Boolean would be
adequate for a single bit, and I haven't (so far) seen any database
which supports both a single-bit type and a boolean. Many databases
support a TINYINT type as a single-byte value, although I'm not sure
there's consistency on whether that's a signed or unsigned value.


In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-07-01 15:51:28 Re: 8.5 development schedule
Previous Message Josh Berkus 2009-07-01 15:38:23 Re: 8.5 development schedule