pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <akretschmer@spamfence.net>
To: pgsql-sql@postgresql.org
Subject: Re: checking the gaps in intervals
Date: Sat, 6 Oct 2012 09:44:10 +0200
Message-ID: <20121006074410.GA14079@tux> (raw)
In-Reply-To: <-3205649711969780110@unknownmsgid>
References: <-3205649711969780110@unknownmsgid>

Anton Gavazuk <antongavazuk@gmail.com> wrote:

> 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...

I'm thinking about a solution with DATERANGE (PostgreSQL 9.2)...


Are start and end including or excluding?


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°




view thread (7+ messages)  latest in thread

Message-ID: <20121006074410.GA14079@tux>
Permalink:  ../20121006074410.GA14079@tux/
Also on:    postgresql.org/message-id/20121006074410.GA14079@tux

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: akretschmer@spamfence.net
  Subject: Re: checking the gaps in intervals
  In-Reply-To: <20121006074410.GA14079@tux>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox