PostgreSQL multirange() Function

The PostgreSQL multirange() function returns a multirange containing just the given range.

PostgreSQL multirange() Syntax

Here is the syntax of the PostgreSQL multirange() function:

multirange(anyrange) -> anymultirange

Parameters

anyrange

Required. A range value.

Return value

The PostgreSQL lower(range) function returns a multirange that contains only the given range.

PostgreSQL lower(range) Examples

Here are some examples of the PostgreSQL multirange() function.

Example 1

SELECT multirange('(1, 3)'::int4range);
 multirange
------------
 {[2,3)}

Example 2

SELECT multirange('[1.1, 5)'::numrange);
 multirange
------------
 {[1.1,5)}