Re: Start with [ , end with )

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Mike Toews <mwtoews(at)gmail(dot)com>
Cc: yonatanhak(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Start with [ , end with )
Date: 2018-04-24 05:09:56
Message-ID: 73E74C0B-CE76-4E7F-BBE6-545EFC9582D1@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs


> On Apr 23, 2018, at 8:37 PM, Mike Toews <mwtoews(at)gmail(dot)com> wrote:
>
> On 24 April 2018 at 01:00, PG Doc comments form <noreply(at)postgresql(dot)org> wrote:
>> 8.17.2. Examples
>>
>> CREATE TABLE reservation (room int, during tsrange);
>> INSERT INTO reservation VALUES
>> (1108, '[2010-01-01 14:30, 2010-01-01 15:30)');
>> ^ ^
>> While not an Error, still...
>
> See 8.17.3. Inclusive and Exclusive Bounds
>
> This is an example with an inclusive lower bound "[" and an exclusive
> upper bound ")”.

When dealing with date/time ranges, it’s a very common use case to have
an inclusive lower-bound and exclusive upper-bound, especially when
dealing with scheduling.

Jonathan

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Craig Ringer 2018-04-24 10:14:14 Re: why is there no CSVQL?
Previous Message Mike Toews 2018-04-24 03:37:13 Re: Start with [ , end with )