Re: BUG #2802: Feature request: tinyint and unsigned types - Mailing list pgsql-bugs

From Bruno Wolff III
Subject Re: BUG #2802: Feature request: tinyint and unsigned types
Date
Msg-id 20061204221117.GA16026@wolff.to
Whole thread Raw
In response to BUG #2802: Feature request: tinyint and unsigned types  ("Albert Strasheim" <fullung@gmail.com>)
Responses Re: BUG #2802: Feature request: tinyint and unsigned types  (Jim Nasby <decibel@decibel.org>)
List pgsql-bugs
On Fri, Dec 01, 2006 at 20:41:32 +0000,
  Albert Strasheim <fullung@gmail.com> wrote:
>
> Description:        Feature request: tinyint and unsigned types

You can already use "char" to store 1 byte values, though unless there are
several of these in a row, you won't save any space because of alignment.

There are also people working on a nicer way to do enum, that looked to
be relatively space efficient (though I don't remember if there was going
to be a way to store small sets using only one byte). This got discussed
a while ago, but didn't make it into 8.2 (as far as I can tell).

Depending on what you are really trying to do, bit strings may also be
useful for you. While individual bit string columns aren't going to fit
in one byte, you can pack bits together which might be a saving over all.

Postgres is extensible, so you can add your one 1 byte types without
doing too much work.

pgsql-bugs by date:

Previous
From: Igor Shevchenko
Date:
Subject: Re: partial PGresult in pgsql v8.2rc1
Next
From: "Thomas H."
Date:
Subject: Re: fsync and semctl errors with 8.1.5/win32