Re: Design of a database table - Mailing list pgsql-general

From hmidi slim
Subject Re: Design of a database table
Date
Msg-id CAMsqVxu3vj-fiHHoqbJsmHQQsM4-ARfcQDi9xSD9fHBWCgmm5Q@mail.gmail.com
Whole thread Raw
In response to Re: Design of a database table  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Design of a database table
List pgsql-general
Actually, the data_periods contains a complete range such as [2018-09-01,2018-09-30] and data_sub_periods contains sub periods contained in this period like:
[2018-09-05, 2018-09-07]
[2018-09-09, 2018-09-11]
[2018-09-12, 2018-09-19]

I make two conditions in order to fetch first if the period [2018-09-01,2018-09-30] contained in the first table.If it exists I will return the sub periods that overlaps the given period
where data_periods.period && '[2018-09-01,2018-09-30]'::daterange
and data_sub_periods  && '
[2018-09-01,2018-09-30] '::daterange


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Question on postgresql.conf
Next
From: "Lu, Dan"
Date:
Subject: RE: Question on postgresql.conf