Re: Have I found an interval arithmetic bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Have I found an interval arithmetic bug?
Date
Msg-id 677937.1626861539@sss.pgh.pa.us
Whole thread Raw
In response to Re: Have I found an interval arithmetic bug?  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Have I found an interval arithmetic bug?  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> Hmm, looking at this whole thread, I have to say that I prefer the old
> behaviour of spilling down to lower units.

> For example, with this patch:

> SELECT '0.5 weeks'::interval;
>  interval
> ----------
>  4 days

> which I don't think is really an improvement. My expectation is that
> half a week is 3.5 days, and I prefer what it used to return, namely
> '3 days 12:00:00'.

Yeah, that is clearly a significant dis-improvement.

In general, considering that (most of?) the existing behavior has stood
for decades, I think we need to tread VERY carefully about changing it.
I don't want to see this patch changing any case that is not indisputably
broken.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Rahila Syed
Date:
Subject: Re: Added schema level support for publication.
Next
From: David Rowley
Date:
Subject: Re: [PATCH] Use optimized single-datum tuplesort in ExecSort