From 4f9e33063cea270166fba12d89fe49876f814398 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Nov 2011 15:34:39 -0500 Subject: Return NULL instead of throwing error when desired bound is not available. Change range_lower and range_upper to return NULL rather than throwing an error when the input range is empty or the relevant bound is infinite. Per discussion, throwing an error seems likely to be unduly hard to work with. Also, this is more consistent with the behavior of the constructors, which treat NULL as meaning an infinite bound. --- doc/src/sgml/func.sgml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b9ef827984d..a7dc05bf382 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10745,6 +10745,14 @@ SELECT NULLIF(value, '(none)') ... + + + The lower and upper functions return null + if the range is empty or the requested bound is infinite. + The lower_inc, upper_inc, + lower_inf, and upper_inf + functions all return false for an empty range. + -- cgit v1.2.3