On Mon, 2021-02-22 at 10:52 -0500, Tom Lane wrote:
> "Michael J. Baars" <mjbaars1977.pgsql-hack...@cyberfiber.eu> writes:
> > So how do you compute the number of seconds in 8 years?
> 
> IMO, that's a meaningless computation, because the answer is not fixed.
> Before you claim otherwise, think about the every-four-hundred-years
> leap year exception in the Gregorian rules.  Besides, what if the
> question is "how many seconds in 7 years"?  Then it definitely varies
> depending on the number of leap days included.
> 
> What does make sense is timestamp subtraction, where the actual
> endpoints of the interval are known.
> 
>                       regards, tom lane
> 
> 
There you have a point. Strange then that you get an answer other than 
'undefined' when subtracting x - y, where y is undefined until x is defined, 
but you are
completely right. An interval of 8 years doesn't count a fixed number of 
seconds.

Thanks,
Mischa.



Reply via email to