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

1-byte integers

From: stig erikson <stigerikson_nospam_(at)yahoo(dot)se>
To: pgsql-sql(at)postgresql(dot)org
Subject: 1-byte integers
Date: 2004-09-17 21:40:45
Message-ID: ciflkp$pjh$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-sql
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

Responses

pgsql-sql by date

Next:From: Omkar RathDate: 2004-09-18 04:54:24
Subject: Sequence of SQL command execution involving triggers and stored procedures.
Previous:From: Chip GobsDate: 2004-09-17 14:44:14
Subject: Implicit Transactions

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