diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-11-14 15:34:39 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-11-14 15:34:39 -0500 |
commit | 4f9e33063cea270166fba12d89fe49876f814398 (patch) | |
tree | e47b774c64242ae1b1e6c864aec2adabd2cf511d /doc/src | |
parent | 851c83fc81917c61b063c875fc1bca489dfcc482 (diff) | |
download | postgresql-4f9e33063cea270166fba12d89fe49876f814398.tar.gz postgresql-4f9e33063cea270166fba12d89fe49876f814398.zip |
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.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 8 |
1 files changed, 8 insertions, 0 deletions
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)') ... </tbody> </tgroup> </table> + + <para> + The <function>lower</> and <function>upper</> functions return null + if the range is empty or the requested bound is infinite. + The <function>lower_inc</function>, <function>upper_inc</function>, + <function>lower_inf</function>, and <function>upper_inf</function> + functions all return false for an empty range. + </para> </sect1> <sect1 id="functions-aggregate"> |