Re: SQL:2011 PERIODS vs Postgres Ranges? - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: SQL:2011 PERIODS vs Postgres Ranges?
Date
Msg-id CAMsGm5f61Xn9N-ENOEncOpYQYP9DyCKtLGxdBo8MiVjWxVB3kQ@mail.gmail.com
Whole thread Raw
In response to SQL:2011 PERIODS vs Postgres Ranges?  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
List pgsql-hackers
On Sun, 21 Oct 2018 at 14:18, Paul A Jungwirth <pj@illuminatedcomputing.com> wrote:
Also, just how strictly do we have to follow the standard? Requiring
sentinels like '01 JAN 3000` just seems so silly. Could Postgres
permit nullable start/end PERIOD columns, and give them the same
meaning as ranges (unbounded)? Even if I forgot about ranges
altogether, I'd sure love to avoid these sentinels.

We have "infinity" and "-infinity" values in our date and timestamp types:


I think this avoids the silliness with sentinel values.

For myself, I don't care about PERIOD etc. one bit. The "every new capability gets its own syntax" model that SQL follows is very old-fashioned, and for good reason. I'm happy with ranges and exclusion constraints. But if we can provide an implementation of PERIOD that makes it easier to port applications written for legacy database systems, it might be worthwhile.

pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: SQL:2011 PERIODS vs Postgres Ranges?
Next
From: Heikki Linnakangas
Date:
Subject: Re: SQL:2011 PERIODS vs Postgres Ranges?