You can use a signed type with a CHECK constraint to restrict the column's value to positive integers.
The sign doesn't concern me. I am storing a value that is unsigned and 16 bits wide natively. I'll have to just use an int4 and waste twice the space I actually need.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.