mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user