https://github.com/postgrespro/daterange_inclusive
A datarange type with inclusive upper bound
https://github.com/postgrespro/daterange_inclusive
Last synced: 4 months ago
JSON representation
A datarange type with inclusive upper bound
- Host: GitHub
- URL: https://github.com/postgrespro/daterange_inclusive
- Owner: postgrespro
- License: other
- Created: 2025-02-25T08:42:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-25T09:36:55.000Z (10 months ago)
- Last Synced: 2025-08-29T12:01:26.345Z (4 months ago)
- Language: C
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# daterange_inclusive
A PostgreSQL datarange type with inclusive upper bound
The daterange type, as well as other range types, is by default output with non-exclusive upper range.
This extension defines a type which is the same but with inclusive upper range.
Such behaviour is more convenient in some practical use cases.
See example:
```
CREATE EXTENSION daterange_inclusive;
SELECT daterange('[2024-01-01,2024-06-01]');
daterange
-------------------------
[2024-01-01,2024-06-02)
SELECT daterange_inclusive('[2024-01-01,2024-06-01]');
daterange_inclusive
-------------------------
[2024-01-01,2024-06-01]
```
## Building
```
USE_PGXS=1 PG_CONFIG=/path_to_pgconfig make install
```