Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbmUN-00038e-Ff for pgsql-general@arkaria.postgresql.org; Sat, 16 Oct 2021 16:24:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mbmUM-0005lJ-At for pgsql-general@arkaria.postgresql.org; Sat, 16 Oct 2021 16:24:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbmUL-0005l9-9M for pgsql-general@lists.postgresql.org; Sat, 16 Oct 2021 16:24:50 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbmUI-0001es-Qo for pgsql-general@lists.postgresql.org; Sat, 16 Oct 2021 16:24:48 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D10125C0042; Sat, 16 Oct 2021 12:24:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 16 Oct 2021 12:24:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=7 s2jxD+UrbmQNjSGzkgJZNy5NaEsfPE4U0nByJXCqis=; b=LNAW9oDlqdHvvU1jg NULl28UHlZpq/9zmqRm+drpYyr4MDyOGCyRKwq5RX2CCCsWMEX8/Sq9g5zrdUNhT x96Rpr+4eyrJ5lu4VHjdiqs7he3RWTPj5I8V5DUj0MIaOplQqTn4n7jLpreagiRh p1ZKZMzAPthuFz1ipny1kXWgVoRlB2l9KjJSRsUJItGlPj56E629Gd2q/FvMjAFx KaENYDV1CGUj1vb32wJrp4gYeaYHmtBWosUwqnM6Oe6l1YCEySOs6cg8mKPX3xYX sLSLehJrygtVDEs02QIGoztS5Pa1YMZGsjz3ti3J/+alSCBLrNv5AGRBx7ovN3he 0o5Ew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=7s2jxD+UrbmQNjSGzkgJZNy5NaEsfPE4U0nByJXCq is=; b=etySX4lroF95CUdKQdiMOxuAqIjVFXmUvjc7jUaoCQjEymWWPWlDYjxo2 De8fGwefNwPEfrYHoIrryNwX/nugp6VU9cDNIu4FUWdyGE5cFlGmlbWl7M24Yvxe ydtW54B1ByQP8vLlvMP3j3A4SrkqRSyaAtdIU27aAZ158HHyTnaZr40e540LV/vd ONklbX8qBj/dUNJzbLZeUmRyqY6QL0o2stmiOP5N79bJor8JqpWXUEafiqgwZ4m+ Lk+KRljqI4fLrbWW3s7VM0ZUgSaOo3w0puVZmga1mMoKQ5aGhOI6drcH1rlikEDf a6PWLV1YWTHvlL2X2FKW2ODpgbeTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdduiedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepvedvkeeihfduhffhtdekleegffduiefgteejgeff gffhteefleeludfgleelgeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Oct 2021 12:24:45 -0400 (EDT) Message-ID: <4ad064ba-1650-cefd-2c44-db909937f90a@aklaver.com> Date: Sat, 16 Oct 2021 09:24:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: "two time periods with only an endpoint in common do not overlap" ??? Content-Language: en-US To: Ron , "pgsql-generallists.postgresql.org" References: <820B633E-90C6-40F0-81A0-CAA074E5762F@yugabyte.com> <2ff5f521-34ab-8690-180a-864441e4f15b@aklaver.com> <0782c52d-2a80-b37f-0b9e-1a2a7cfb68c5@gmail.com> <98ea7ea3-38ac-d145-e668-803e5ea14de7@aklaver.com> <6f61f1d3-c110-e6dd-d742-1bb45fb6e90e@gmail.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/15/21 21:54, Ron wrote: >> >> >> There is no straight time range, you would have to use tsrange or >> tstzrange. The principle still holds though you can make ranges >> overlap or not depending on '[)' or '[]'. > > OP refers to the OVERLAP operator (is it an operator), not the tsrange() > function. > Your statement was: "The numeric ranges 0-10 and 10-19 overlap, just as the time ranges 00:01:00-00:00:02:00 overlaps 00:02:00-00:03:00." I was just pointing out that is not necessarily true. As was pointed out upstream there are good reasons for not having 1:00-2:00 and 2:00-3:00 overlap. As David pointed out it is about following the documented behavior. I still have to remember, on occasion, that BETWEEN actually includes the end points not just points in between them. -- Adrian Klaver adrian.klaver@aklaver.com