I have 7 8-bit integer values per record that I want to store in Postgres. Pg doesn\'t offer a single byte integer type, SMALLINT, or 2 bytes, being the smallest integer datatyp
There is pg_catalog.char ( another notation - "char" ) type which uses only 1 byte to store its value.
pg_catalog.char
select pg_column_size( 'A' ); pg_column_size ---------------- 2 (1 row) select pg_column_size( 'A'::"char" ); pg_column_size ---------------- 1 (1 row)