int4range
, int8range
, daterange
, tsrange
, and
tstzrange
.range
argument accepts a Postgres range type.
An inclusive lower bound is represented by [
while an exclusive lower bound is represented by (
. Likewise, an inclusive upper bound is represented by ]
, while an exclusive upper bound is represented by )
.
For instance, the following query selects ratings between 1
and 3
, inclusive.
NULL
into either the upper or lower bound causes Postgres to treat the upper/lower bounds as
positive/negative infinity.