Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UUL8a-000792-A2 for pgsql-sql@arkaria.postgresql.org; Mon, 22 Apr 2013 18:06:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UUL8Z-0002iF-9d for pgsql-sql@arkaria.postgresql.org; Mon, 22 Apr 2013 18:06:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UUL8T-0002dN-1S for pgsql-sql@postgresql.org; Mon, 22 Apr 2013 18:06:41 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UUL8P-0006z9-Ur for pgsql-sql@postgresql.org; Mon, 22 Apr 2013 18:06:40 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UUL8P-0002iB-Bv for pgsql-sql@postgresql.org; Mon, 22 Apr 2013 20:06:37 +0200 Received: from dslb-084-060-109-059.pools.arcor-ip.net ([84.60.109.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Apr 2013 20:06:37 +0200 Received: from WolfgangMeiners01 by dslb-084-060-109-059.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Apr 2013 20:06:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Wolfgang Meiners Subject: Re: check for overlapping time intervals Date: Mon, 22 Apr 2013 20:06:31 +0200 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-084-060-109-059.pools.arcor-ip.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Am 22.04.13 12:36, schrieb Thomas Kellerer: > Wolfgang Meiners, 22.04.2013 12:19: >> Is there a simpler way to check for overlapping timeintervals? I ask >> this question, because i have more similar tables with similar layout >> and would have to write similar functions again and again. > > Do you have the possibility to upgrade to 9.2? > > The range types introduced with 9.2 seem to be *exactly* what you need. > > Regards > Thomas > Hi Thomas, after looking a bit i found you are right. There may be some hacks to do it without range types, but with range types it is straigt forward to implement. I am not quite happy to upgrade to 9.2 because i just got everything running fine on 9.1. But i think, i will do it this way. Thank you for your help. Wolfgang -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql