Summary
The catalog pg_range stores information about range types. This is in addition to the types’ entries in pg_type.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_range system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
rngtypidoidreferencespg_type.oid
OID of the range typerngsubtypeoidreferencespg_type.oid
OID of the element type (subtype) of this range typerngmultitypidoidreferencespg_type.oid
OID of the multirange type for this range typerngcollationoidreferencespg_collation.oid
OID of the collation used for range comparisons, or zero if nonerngsubopcoidreferencespg_opclass.oid
OID of the subtype’s operator class used for range comparisonsrngconstruct2regprocreferencespg_proc.oid
OID of the 2-argument range constructor function (lower and upper)rngconstruct3regprocreferencespg_proc.oid
OID of the 3-argument range constructor function (lower, upper, and flags)rngmltconstruct0regprocreferencespg_proc.oid
OID of the 0-argument multirange constructor function (constructs empty range)rngmltconstruct1regprocreferencespg_proc.oid
OID of the 1-argument multirange constructor function (constructs multirange from single range, also used as cast function)rngmltconstruct2regprocreferencespg_proc.oid
OID of the 2-argument multirange constructor function (constructs multirange from array of ranges)rngcanonicalregprocreferencespg_proc.oid
OID of the function to convert a range value into canonical form, or zero if nonerngsubdiffregprocreferencespg_proc.oid
OID of the function to return the difference between two element values as double precision, or zero if none
Related catalogs
This object references the following other system catalogs:
rngtypid→pg_typerngcollation→pg_collationrngsubopc→pg_opclassrngconstruct2→pg_proc
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_range.