Is it possible to store a 1 byte number in Postgres?

后端 未结 7 1967
南方客
南方客 2021-02-04 00:26

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

7条回答
  •  攒了一身酷
    2021-02-04 01:26

    I haven't tested them myself, but there are extensions for this; e.g http://pgxn.org/dist/tinyint/ .

提交回复
热议问题