>On Sun, Apr 2, 2023 at 5:36 PM Tom Lane <
tgl@sss.pgh.pa.us> wrote:
>
> Joseph Koshakow <
koshy44@gmail.com> writes:
> > I've attached a patch with these changes that is meant to be applied
> > over the previous three patches. Let me know what you think.
>
> Does not really seem like an improvement to me --- I think it's
> adding more complexity than it removes. The changes in CONTEXT
> messages are definitely not an improvement; you might as well
> not have the context messages at all as give misleading ones.
> (Those context messages are added by the previous patches, no?
> They do not really seem per project style, and I'm not sure
> that they are helpful.)
Yes they were added in the previous patch,
v17-0003-Add-infinite-interval-values.patch. I also had the following
note about them.
> I've added an errcontext to all the errors of the form "X out of
> range". My one concern is that some of the messages can be slightly
> confusing. For example date arithmetic is converted to timestamp
> arithmetic, so the errcontext talks about timestamps even though the
> actual operation used dates. For example,
>
> SELECT date 'infinity' + interval '-infinity';
> ERROR: interval out of range
> CONTEXT: while adding an interval and timestamp
I would be OK with removing all of the context messages or maybe only
keeping a select few, like the ones in interval_um.
How do you feel about redefining interval_mi in terms of interval_um
and interval_pl? That one felt like an improvement to me even outside
of the context of this change.
Thanks,
Joe Koshakow