How to get an inclusive interval when using daterange

Поиск
Список
Период
Сортировка
От hmidi slim
Тема How to get an inclusive interval when using daterange
Дата
Msg-id CAMsqVxtEkr-KwmvoM==+8vruv0hMc9bLd8E+csrRzAxfkx36wg@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to get an inclusive interval when using daterange  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,
I have a table availability which contains 3 columns:  id, product_id and period_availability(type daterange).

When I insert a data into this table I use this query:
insert into availability values ('product x', daterange('2018-02-02', '2018-03-01', '[]')

So I get a period like this: [2018-02-02, 2018-03-02)
In my app I tried to subtract a day from the period when I got it from database.I'm using daterange and not tsrange because the daterange gives me less execution time when I make tests with a huge number of data.So is there any way to get an inclusive interval with daterange or I have to use tsrange to get inclusive intervals?

В списке pgsql-general по дате отправления:

Предыдущее
От: "Mr. Baseball 34"
Дата:
Сообщение: Concatenate of values in hierarchical data
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to get an inclusive interval when using daterange