This implementation is a branch from http://pgfoundry.org/projects/uint/ by Ryan Bradetich. It provides unsigned 2 byte and unsigned 4 byte data types to postgres 8.1 and greater.
This implementation of uint duplicates https://github.com/maciekgajewski/postgres-uints in a way. But atop of that this implementation provides also uint1.
PATH=<path to your PostgreSQL bin with **pg_config**>:$PATH; make && make install
postgres=# CREATE EXTENSION uint;
CREATE EXTENSION
postgres=# CREATE TABLE utable (id uint4, val8bit uint1);
CREATE TABLE
postgres=# INSERT INTO utable VALUES (1, 2), (3, 4), (5, 6);
INSERT 0 3
postgres=# SELECT * FROM utable;
id | val8bit
----+---------
1 | 2
3 | 4
5 | 6
(3 rows)
postgres=# \d utable
Table "public.utable"
Column | Type | Modifiers
---------+-------+-----------
id | uint4 |
val8bit | uint1 |
Content type
Image
Digest
Size
114 MB
Last updated
about 7 years ago
docker pull nad2000/postgres-uint