doc: clarify handling of range upper/lower/upper_inf/lower_inf()
authorBruce Momjian
Mon, 13 Nov 2023 21:08:01 +0000 (16:08 -0500)
committerBruce Momjian
Mon, 13 Nov 2023 21:08:22 +0000 (16:08 -0500)
Clarify handling of infinite range bounds.

Reported-by: [email protected]
Discussion: https://postgr.es/m/160508672127.25505.8356390205508789564@wrigleys.postgresql.org

Co-authored-by: Laurenz Albe
Backpatch-through: 16

doc/src/sgml/func.sgml

index 92843b2abb3b6b66c0d44e494fc2b4892dabaf53..202e64d0e072f1bf2865ab5884cdf25703b0e560 100644 (file)
@@ -19963,7 +19963,7 @@ SELECT NULLIF(value, '(none)') ...
        
        
         Extracts the lower bound of the range (NULL if the
-        range is empty or the lower bound is infinite).
+        range is empty or has no lower bound).
        
        
         lower(numrange(1.1,2.2))
@@ -19981,7 +19981,7 @@ SELECT NULLIF(value, '(none)') ...
        
        
         Extracts the upper bound of the range (NULL if the
-        range is empty or the upper bound is infinite).
+        range is empty or has no upper bound).
        
        
         upper(numrange(1.1,2.2))
@@ -20049,7 +20049,8 @@ SELECT NULLIF(value, '(none)') ...
         boolean
        
        
-        Is the range's lower bound infinite?
+        Does the range have no lower bound?  (A lower bound of
+        -Infinity returns false.)
        
        
         lower_inf('(,)'::daterange)
@@ -20066,7 +20067,8 @@ SELECT NULLIF(value, '(none)') ...
         boolean
        
        
-        Is the range's upper bound infinite?
+        Does the range have no upper bound?  (An upper bound of
+        Infinity returns false.)
        
        
         upper_inf('(,)'::daterange)
@@ -20121,7 +20123,7 @@ SELECT NULLIF(value, '(none)') ...
        
        
         Extracts the lower bound of the multirange (NULL if the
-        multirange is empty or the lower bound is infinite).
+        multirange is empty has no lower bound).
        
        
         lower('{[1.1,2.2)}'::nummultirange)
@@ -20139,7 +20141,7 @@ SELECT NULLIF(value, '(none)') ...
        
        
         Extracts the upper bound of the multirange (NULL if the
-        multirange is empty or the upper bound is infinite).
+        multirange is empty or has no upper bound).
        
        
         upper('{[1.1,2.2)}'::nummultirange)
@@ -20207,7 +20209,8 @@ SELECT NULLIF(value, '(none)') ...
         boolean
        
        
-        Is the multirange's lower bound infinite?
+        Does the multirange have no lower bound?  (A lower bound of
+        -Infinity returns false.)
        
        
         lower_inf('{(,)}'::datemultirange)
@@ -20224,7 +20227,8 @@ SELECT NULLIF(value, '(none)') ...
         boolean
        
        
-        Is the multirange's upper bound infinite?
+        Does the multirange have no upper bound?  (An upper bound of
+        Infinity returns false.)
        
        
         upper_inf('{(,)}'::datemultirange)