4 ms·
FWIW, Postgres converts all ranges (=interval in this context) for discrete data types to half open intervals even when a closed one was requested. So the date
by hans_castorp 4y ago
FWIW, Postgres converts all ranges (=interval in this context) for discrete data types to half open intervals even when a closed one was requested.
So the daterange '[2022-01-01, 2022-01-07]' will result in [2022-01-01,2022-01-08) and the integer range '[1,7]' will result in '[1,8)'
So it seems the Postgres devs agree with the author.
Edit: typo fixed for integer range
- zmgsabst 4y agoSmall comment: I think you have your integer example backwards, ie [1,8) = [1,7].
- hans_castorp 4y agoYes, of course ;) Copy & Paste error.