| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
| Cc: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, jani(dot)rahkola(at)iki(dot)fi, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Documentation of return values of range functions lower and upper |
| Date: | 2023-11-01 22:03:47 |
| Message-ID: | ZULLQ0Zycz8PmfsT@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
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.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.
| Attachment | Content-Type | Size |
|---|---|---|
| range.diff | text/x-diff | 3.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2023-11-01 22:15:24 | Re: 'pg_global' cannot be used as default_tablespace. |
| Previous Message | Laurenz Albe | 2023-11-01 20:40:43 | Re: Documentation of return values of range functions lower and upper |