public inbox for [email protected]
help / color / mirror / Atom feedFrom: Paul A Jungwirth <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: Typo in range types documentation
Date: Mon, 17 Nov 2025 09:06:58 -0800
Message-ID: <CA+renyU-m8-tD7_Ab8Oy8+5wutLOwFnrqhYOsrchtsuLt9fvfA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Mon, Nov 17, 2025 at 8:34 AM PG Doc comments form
<[email protected]> wrote:
> It looks to me as if there is an error in the sample associated with
> documentation on date ranges on page:
> https://www.postgresql.org/docs/current/rangetypes.html
> If you scroll to the last few examples on the page, the values inserted are
> in [) brackets rather than [] brackets.
Do you mean the room_reservation table? A tsrange uses [) syntax,
signifying closed/open endpoints. So it includes the start time but
not the end time. This is the most common way to use ranges, since it
lets adjacent ranges "lock together" without any overlap.
You can input tsranges with whatever endpoints you like, but they will
use [) syntax when they draw themselves. You can define new range
types with different behavior though. See
https://www.postgresql.org/docs/18/rangetypes.html#RANGETYPES-DISCRETE
Yours,
--
Paul ~{:-)
[email protected]
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Typo in range types documentation
In-Reply-To: <CA+renyU-m8-tD7_Ab8Oy8+5wutLOwFnrqhYOsrchtsuLt9fvfA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox