From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
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:54:14 |
Message-ID: | 1072037.1680476054@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Joseph Koshakow <koshy44(at)gmail(dot)com> writes:
>> I've added an errcontext to all the errors of the form "X out of
>> range".
Please note the style guidelines [1]:
errcontext(const char *msg, ...) is not normally called directly from
an ereport message site; rather it is used in error_context_stack
callback functions to provide information about the context in which
an error occurred, such as the current location in a PL function.
If we should have this at all, which I doubt, it's probably
errdetail not errcontext.
> 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.
I did not think so. For one thing, it introduces integer-overflow
hazards that you would not have otherwise; ie, interval_um might have
to throw an error for INT_MIN input, even though the end result of
the calculation would have been in range.
regards, tom lane
[1] https://www.postgresql.org/docs/devel/error-message-reporting.html
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2023-04-02 22:56:38 | Re: Minimal logical decoding on standbys |
Previous Message | Peter Geoghegan | 2023-04-02 22:52:14 | Re: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder() |