PostgreSQL upper_inc() Function

The PostgreSQL upper_inc() function checks whether the upper bound of a given range is inclusive.

PostgreSQL upper_inc() Syntax

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

upper_inc(anyrange) -> boolean
upper_inc(anymultirange) -> boolean

Parameters

anyrange

Required. A range value.

anymultirange

Required. A multirange value.

Return value

The PostgreSQL upper_inc() function returns a boolean value indicating whether the upper bound of the range is inclusive.

PostgreSQL upper_inc() Examples

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

Example 1

SELECT upper_inc('[1, 4]'::int4range);
 upper_inc
-----------
 f

Example 2

SELECT upper_inc('[1, 4)'::int4range);
 upper_inc
-----------
 f

Example 3

SELECT upper_inc('(1, 1)'::int4range);
 upper_inc
-----------
 f