Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKGbG-0007cD-Ke for pgsql-sql@postgresql.org; Fri, 05 Oct 2012 22:42:30 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TKGbE-0006LN-6M for pgsql-sql@postgresql.org; Fri, 05 Oct 2012 22:42:29 +0000 Received: by mail-lb0-f174.google.com with SMTP id n3so1758472lbo.19 for ; Fri, 05 Oct 2012 15:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:mime-version:date:message-id:subject:to:content-type; bh=vRGNbmIMPWjPlguhpSjc5FTbYSC2Wed/uxA3JpplbNA=; b=0QVE3+DyPaObwtcDSRn36drKoUNga2IaiWCWCgXluZLbXmWDGCoRfudR9uUdb/5CWY Yf87uWY/11BJx0MARH4ij27+r2ts6SDKI1xn/riznCb9zI9i5p01pOwo0fHTI/SpTZyv whecmFr/na3Y0L6zW9MU9nbIdTXkdTDDJ3fkRJzWqK8SYKSAp6dCqG0dkLmBoj7ramhD n6saZTRDYZu8eEilR38w8bmRmivwFEBB/L6ic1YJz1MzYZx8OriAjSJMdZSOxQ2qQXGj IeiewMsD/ZASZdKjCyqEdHESfQmll3+PzFowOjTJd4mUalAK515+o3WtfvPWTHCkVOYp Hu3A== Received: by 10.152.108.83 with SMTP id hi19mr7952705lab.31.1349476947223; Fri, 05 Oct 2012 15:42:27 -0700 (PDT) From: Anton Gavazuk Mime-Version: 1.0 (1.0) Date: Sat, 6 Oct 2012 00:42:29 +0200 Message-ID: <-3205649711969780110@unknownmsgid> Subject: checking the gaps in intervals To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201210/23 X-Sequence-Number: 36894 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