pgsql: Return NULL instead of throwing error when desired bound is not

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Return NULL instead of throwing error when desired bound is not
Date: 2011-11-14 20:34:48
Message-ID: E1RQ3Eu-0007xX-UA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4f9e33063cea270166fba12d89fe49876f814398

Modified Files
--------------
doc/src/sgml/func.sgml | 8 ++++++++
src/backend/utils/adt/rangetypes.c | 22 ++++++----------------
2 files changed, 14 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-11-15 01:28:54 pgsql: Update oidjoins regression test to match git HEAD.
Previous Message Tom Lane 2011-11-14 20:16:07 pgsql: Return FALSE instead of throwing error for comparisons with empt