Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/29/21 2:48 PM, Bryn Llewellyn wrote:
On 27-Mar-2021, at 01:42, Francisco Olarte <folarte@xxxxxxxxxxxxxx> 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@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux