Re: Documentation of return values of range functions lower and upper

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Documentation of return values of range functions lower and upper
Дата
Msg-id ed4f1dcba4aa0f1f00023a9346e2f925f3cc62c8.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Documentation of return values of range functions lower and upper  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Documentation of return values of range functions lower and upper  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
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



В списке pgsql-docs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 'pg_global' cannot be used as default_tablespace.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 'pg_global' cannot be used as default_tablespace.