checking the gaps in intervals

From: Anton Gavazuk <antongavazuk(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: checking the gaps in intervals
Date: 2012-10-05 22:42:29
Message-ID: -3205649711969780110@unknownmsgid
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi dear community,

Have probably quite simple task but cannot find the solution,

Imagine the table A with 2 columns start and end, data type is date

start end
01 dec. 10 dec
11 dec. 13 dec
17 dec. 19 dec
.....

If I have interval, for example, 12 dec-18 dec, how can I determine
that the interval cannot be fully covered by values from table A
because of the gap 14-16 dec? Looking for solution and unfortunately
nothing has come to the mind yet...

Thanks,
Anton

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Kretschmer 2012-10-06 07:44:10 Re: checking the gaps in intervals
Previous Message Craig Ringer 2012-10-05 03:34:33 Re: Calling the CTE for multiple inputs