PostgreSQL upper_inf() Function
The PostgreSQL upper_inf() function checks whether the upper bound of a given range is infinite.
PostgreSQL upper_inf() Syntax
Here is the syntax of the PostgreSQL upper_inf() function:
upper_inf(anyrange) -> boolean
upper_inf(anymultirange) -> boolean
Parameters
anyrange-
Required. A range value.
anymultirange-
Required. A multirange value.
Return value
The PostgreSQL upper_inf() function returns a boolean value indicating whether the upper bound of a given range is infinite.
PostgreSQL upper_inf() Examples
Here are some examples of the PostgreSQL upper_inf() function.
Example 1
SELECT
upper_inf('(1, 5)'::int4range),
upper_inf('(1,)'::int4range);
upper_inf | upper_inf
-----------+-----------
f | tExample 2
SELECT upper_inf('{(,), (2, 4)}'::int4multirange);
upper_inf
-----------
t