Re: Infinite Interval

From: Joseph Koshakow <koshy44(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, "Gregory Stark (as CFM)" <stark(dot)cfm(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Infinite Interval
Date: 2023-04-02 22:34:20
Message-ID: CAAvxfHfxnyw+U4rTyB2jS7bBGj5TvEKT4LxyCbzOUosn0+AFpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>On Sun, Apr 2, 2023 at 5:36 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Joseph Koshakow <koshy44(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-04-02 22:40:24 Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
Previous Message Andres Freund 2023-04-02 22:30:55 Re: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()