pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: stig erikson <stigerikson_nospam_@yahoo.se>
To: pgsql-sql@postgresql.org
Subject: 1-byte integers
Date: Fri, 17 Sep 2004 23:40:45 +0200
Message-ID: <ciflkp$pjh$1@news.hub.org> (raw)

how can i specify an integer to be one byte byte or even 4 bits long?
int1, int(1), tinyint are nowhere to be seen.
smallest i can find is smallint that is 2 bytes.

in a table i will have a few columns with values between 0 and 15, so 
optimally i am looking for some kind of  unsigned 4-bits, or (un)signed 
integer (1-byte).

i can live with smallint for a while but estimate a few millions of rows 
in the table to be a reality soon, in such cases every byte matters.

is there some

stig



view thread (2+ messages)  latest in thread

Message-ID: <ciflkp$pjh$1@news.hub.org>
Permalink:  ../ciflkp$pjh$1@news.hub.org/
Also on:    postgresql.org/message-id/ciflkp$pjh$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: stigerikson_nospam_@yahoo.se
  Subject: Re: 1-byte integers
  In-Reply-To: <ciflkp$pjh$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox