type
RANGE
PostgreSQL ranges describe intervals of ordered values with inclusive or exclusive bounds. Integer ranges have canonical forms. Example target: PostgreSQL 17. Run in a disposable database; examples need no existing tables.
Formal Syntax & Structure
sql syntaxsql
int4range (example built-in type)Working Example
Example Snippetsql
SELECT int4range(1,5,'[)') @> 5;