Updated on 2024-06-03 GMT+08:00

PG_RANGE

PG_RANGE records information about range types, except for records of types in PG_TYPE.

Table 1 PG_RANGE columns

Name

Type

Reference

Description

rngtypid

oid

OID in PG_TYPE

OID of the range type.

rngsubtype

oid

OID in PG_TYPE

OID of the element type (subtype) of this range type.

rngcollation

oid

OID in PG_COLLATION

OID of the collation used for range comparisons (0 if none).

rngsubopc

oid

OID in PG_OPCLASS

OID of the subtype's operator class used for range comparisons.

rngcanonical

regproc

proname in PG_PROC

Name of the function to convert a range value into canonical form (0 if none).

rngsubdiff

regproc

proname in PG_PROC

Name of the function used to calculate the difference between two elements in a range. The return value of the function is of the double-precision type. If the function does not exist, the value of rngsubdiff is 0.

If the element type is discrete, rngcanonical determines the collation used for the range type. If the element type is not collatable, rngsubopc determines the collation used for the range type. If the element type is collatable, rngsubopc and rngcollation determine the collation used for the range type.