Search Postgresql Archives

How to get an inclusive interval when using daterange

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux