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 1lRFyX-0001PD-2b for pgsql-general@arkaria.postgresql.org; Tue, 30 Mar 2021 15:08:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRFyV-0002BV-VC for pgsql-general@arkaria.postgresql.org; Tue, 30 Mar 2021 15:08:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRFyV-0002BO-NZ for pgsql-general@lists.postgresql.org; Tue, 30 Mar 2021 15:08:11 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRFyP-0007if-3s for pgsql-general@lists.postgresql.org; Tue, 30 Mar 2021 15:08:11 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A6C5C5C00AE; Tue, 30 Mar 2021 11:08:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 30 Mar 2021 11:08:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=y Qd+lfFSdD/mGHzcf0e1JYZC3qvpFd5IRO155dBmon0=; b=RRQ27eguL5jxEudup BoXxiyhF4j7xSWatkeFRadnnWqgyQ69MqNCY/B05ovFIUKyhGhA79DXcCEtXpS6q VSn+G9v3VfpxQJcef97oYrnl3kURczntXi++qiUpl3MguiP1qqaQDSzHReh+P9Ul wi+4nXo1PHodlMZ2N72HWSMy2XrvpEipZFw4wgRoi49+5ts91lI+lL4VmBZAvbeC aUCw+pT7DIAjca9/miDU0CkmnkhcvGiUtExeRcibsijF6W3+52kWARFRzD8Mheq8 sPG67+sVlhB8Co2KHIqBTtno7uSgrK7jXNLco03h5Qm4DY09bzNQP3QDQzOvOhLA NQdBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; bh=yQd+lfFSdD/mGHzcf0e1JYZC3qvpFd5IRO155dBmo n0=; b=CRR7w12nLpZcD4t6LsLhXn3SRk6MgKkQxe1hs9lZ+wa7z+YnmJDdnN3AQ P/iyihJLqmKaEc2JvTkZhjdwVeeUg+ev5SKgU7xheILYxLTIvEkiTx0nYPrfNmro 5GYCAg2f0UgDbSNWop6/auc+2zJ1a+0OFWHdVhq1GWKdEt5vLk8njA1IOsR0gMMt zcDjvLesU282qogxKip3+fWx39SrGn7A/sV8rf5RvBQUrofdPIcsPDN6HhUuSOYd D7hturKC3zcIsOI/HacZhhohIR5QqPv3+qhFcBqJzV3ugf1YFcRO6+cZilip5Uu7 zr+OgLq40jQtXf3l5hMJPzGovdSkQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeitddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeduudefjeetveffhefgudehtdfhvdetkeeiueehfeev veduteekleeuheegudehhfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cukfhppeeljedruddufedrvddujedrvdejnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrh drtghomh X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id 5D119240067; Tue, 30 Mar 2021 11:08:02 -0400 (EDT) Subject: Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value To: Bryn Llewellyn , Francisco Olarte Cc: pgsql-general list References: <402F8EFB-3FE9-421A-B3BA-F736AB8E3ABB@yugabyte.com> <1578541.1616765766@sss.pgh.pa.us> <7CCA5681-341E-440B-BD94-3EA8DB003C5A@yugabyte.com> From: Adrian Klaver Message-ID: Date: Tue, 30 Mar 2021 08:08:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <7CCA5681-341E-440B-BD94-3EA8DB003C5A@yugabyte.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/29/21 2:48 PM, Bryn Llewellyn wrote: >> On 27-Mar-2021, at 01:42, Francisco Olarte wrote: >> >> Bryn, ( 1st, sorry if I misquote something, but i use text-only for the list )... > > Thanks again, Francisco. You said several things that clarify my understanding. Re your comment: > >> I've never tried to make some thing as complex as what you seem to be trying… > > What I’m trying to do is to understand interval semantics so that I can write a clear account of this topic. I do find the PostgreSQL doc on the topic difficult to use for this purpose because information is scattered and (as you said) it’s a dense read. This is why (though I don’t like the approach) I’m amassing empirical observations and trying to fit a mental model to what I observe. > > Re your comment: > >> I'm completely lost with the horological/cultural things… > > My claim is that there’s a genuine distinction to be drawn in the conceptual domain—and that this can be made independently of any particular computer system. I might say that “1 day” is simply the same thing as “24 hours”, in the same way that “1 foot” is the same as “12 inches”. But my discussion partner might argue with this saying that the length of one day is sometimes 23 hours and sometimes 25 hours due to the much-rehearsed arguments about DST. Here, I’d be thinking horologically and my discussion partner would be thinking culturally. Those two terms of art (or other equivalent ones) are useful to stop a fist fight breaking out by allowing each discussion partner to understand, and label, the other’s mental model—both of which have merit. The point is horology is cultural, see non-Western calendars and alternate time keeping methods. Trying to maintain a distinction between the two concepts only furthers the confusion. The inconsistencies you see are the result of one(culture) intervening in the other(horology). > > Notice that the same argument could be had about the equivalence of “1 minute” and “60 seconds” in the light of the “leap second” phenomenon. It just happens that when we get to PostgreSQL, its Proleptic Gregorian Calendar implementation knows nothing of leap seconds. At least, this is how I interpret “because leap seconds are not handled” on the https://www.postgresql.org/docs/11/functions-datetime.html page. > -- Adrian Klaver adrian.klaver@aklaver.com