Support for unsigned integer types

From: Jack Bay <jack(dot)victor(dot)bay(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Support for unsigned integer types
Date: 2024-12-06 18:45:54
Message-ID: CAN3gO4sPBKbfWYK10i294u3kzsfDb4WX891FMbjLnKjMS08u7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Unsigned integers are a widely used type and can be important for
compact and well-aligned data structures, but are not currently
available in PostgreSQL.

In particular unsigned 64-bit integers and unsigned 32-bit integers
are desirable as identifiers. They unambiguously correspond to
specific hexadecimal or other human-readable encoded representations.
Although signed integers can be used for this purpose, there is the
potential for human error in confusing a positive value for a negative
value, corner cases around maximum and minimum values (which are
statistically certain to be encountered when random bits are used for
the integer), the potential for human error in interconverting hex and
other encoded representations, text representation nonuniformity (the
need for a space for the minus sign), and a variety of associated
nuisances.

Would it be possible to add support for unsigned 64-bit and unsigned
32-bit integers to postgresql?

Thanks!

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-12-06 18:51:48 Re: Giving the shared catalogues a defined encoding
Previous Message Scott Taylor 2024-12-06 18:26:51 Unable to Recover a Deleted Database Using PITR