Re: single bit integer (TINYINT) revisited for 8.5
Kevin Grittner <kevin.grittner@wicourts.gov>
From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Caleb Cushing" <xenoterracide@gmail.com>, <pgsql-hackers@postgresql.org>
Date: 2009-07-01T15:41:18Z
Lists: pgsql-hackers
Caleb Cushing <xenoterracide@gmail.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. -Kevin