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

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
Message-ID: (view raw, whole thread or download thread mbox)
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


pgsql-hackers by date

Next:From: Robert HaasDate: 2009-07-01 15:51:28
Subject: Re: 8.5 development schedule
Previous:From: Josh BerkusDate: 2009-07-01 15:38:23
Subject: Re: 8.5 development schedule

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