Re: single bit integer (TINYINT) revisited for 8.5

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Caleb Cushing <xenoterracide(at)gmail(dot)com>
Subject: Re: single bit integer (TINYINT) revisited for 8.5
Date: 2009-07-03 17:38:11
Message-ID: 200907031338.11653.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday 02 July 2009 12:40:49 Simon Riggs wrote:
> On Wed, 2009-07-01 at 11:19 -0400, Caleb Cushing wrote:
> > 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 end up using smallint but it's range is huge
> > for the actual requirements.
>
> Completely agree.
>

Blech. More often than not, I find people using all these granular types to be
nothing more than premature optimization. And if you really do need a single
byte type, you can use "char" (though again I'm not a big fan of that)

> I'm most or the way through working on this as an add-on module, rather
> than a new datatype in core. I don't see much reason to include it in
> core: its not an SQL standard datatype, it complicates catalog entries
> and most people don't need or want it.
>

That's too bad. I'd much rather see someone implement something closer to
Oracle's number type.

--
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2009-07-03 17:56:16 Re: Upgrading our minimum required flex version for 8.5
Previous Message Tom Lane 2009-07-03 17:35:13 Re: pg_migrator mention in documentation