Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value - Mailing list pgsql-general

From Bryn Llewellyn
Subject Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value
Date
Msg-id 7CCA5681-341E-440B-BD94-3EA8DB003C5A@yugabyte.com
Whole thread Raw
In response to Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value  (Francisco Olarte <folarte@peoplecall.com>)
Responses Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
> On 27-Mar-2021, at 01:42, Francisco Olarte <folarte@peoplecall.com> 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
thePostgreSQL doc on the topic difficult to use for this purpose because information is scattered and (as you said)
it’sa dense read. This is why (though I don’t like the approach) I’m amassing empirical observations and trying to fit
amental 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
independentlyof any particular computer system. I might say that “1 day” is simply the same thing as  “24 hours”, in
thesame way that “1 foot” is the same as “12 inches”. But my discussion partner might argue with this saying that the
lengthof one day is sometimes 23 hours and sometimes 25 hours due to the much-rehearsed arguments about DST. Here, I’d
bethinking horologically and my discussion partner would be thinking culturally. Those two terms of art (or other
equivalentones) 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. 

Notice that the same argument could be had about the equivalence of “1 minute” and “60 seconds” in the light of the
“leapsecond” phenomenon. It just happens that when we get to PostgreSQL, its Proleptic Gregorian Calendar
implementationknows nothing of leap seconds. At least, this is how I interpret “because leap seconds are not handled”
onthe https://www.postgresql.org/docs/11/functions-datetime.html page. 


pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: questions about wraparound
Next
From: Don Seiler
Date:
Subject: Dangerous Naming Confusion