pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Bruce Momjian <bruce@momjian.us>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: jani.rahkola@iki.fi
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Documentation of return values of range functions lower and upper
Date: Thu, 02 Nov 2023 08:56:13 +0100
Message-ID: <ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at> (raw)
In-Reply-To: <ZULLQ0Zycz8PmfsT@momjian.us>
References: <160508672127.25505.8356390205508789564@wrigleys.postgresql.org>
	<53ec9f116bea9252d7fa9341e024530553656c42.camel@cybertec.at>
	<16601466752e40543051369fac722c0a200bb4e6.camel@cybertec.at>
	<27d690d8-0987-5f2b-a2da-fc2ec7c19e3c@oss.nttdata.com>
	<02f3fa3a592fa6c1f8ec1a9f539ae376f744eb42.camel@cybertec.at>
	<ZUK0-gzxmfHdDila@momjian.us>
	<a0f9f8fa5de833acd7cf9e74352ef347ade6572d.camel@cybertec.at>
	<ZULLQ0Zycz8PmfsT@momjian.us>

On Wed, 2023-11-01 at 18:03 -0400, Bruce Momjian wrote:
> On Wed, Nov  1, 2023 at 09:40:43PM +0100, Laurenz Albe wrote:
> > > Yes, I agree this documentation needs help.
> > > 
> > > For upper/lower(), it is clear that the documentation is better saying
> > > "unspecified" rather than infinite.  The fact that upper/lower_inf()
> > > returns false for +/-Infinity is quite odd, but should at least be
> > > documented.
> > > 
> > > Patch attached.  It is odd that +Infinity (vs. Infinity) wasn't
> > > supported for datetime input until PG 16, but I think we have to say
> > > +/-infinity vs (blank)/-Infinity.
> > > 
> > > Patch attached.
> > 
> > I am unhappy with "unspecified".  A NULL value as upper or lower bound has a very
> > specific meaning, namely that the range is unbounded in that direction.  This is
> > a bit confusing, since NULL is typically used for unknown or undefined values.
> > 
> > I think it would be better to say "returns NULL if the range is empty or unbounded"
> > and "is the range unbounded on the upper end?".
> 
> I had to go with "Is the multirange's lower bound unbounded?" because
> the surrounding items use that sentence structure.  Patch attached.

Better, though "Is the range's upper bound unbounded?" makes me cringe.
It is not the bound that is bounded or not, but the range.

How about "Is the range unbounded at the upper end?" or "Does the range
have no upper bound?"

Yours,
Laurenz Albe





view thread (14+ messages)  latest in thread

Message-ID: <ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at>
Permalink:  ../ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at/
Also on:    postgresql.org/message-id/ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: laurenz.albe@cybertec.at, bruce@momjian.us, masao.fujii@oss.nttdata.com, jani.rahkola@iki.fi, pgsql-docs@lists.postgresql.org
  Subject: Re: Documentation of return values of range functions lower and upper
  In-Reply-To: <ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox