Re: Infinite Interval

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Infinite Interval
Дата
Msg-id 1072037.1680476054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Ответы Re: Infinite Interval  (Joseph Koshakow <koshy44@gmail.com>)
Список pgsql-hackers
Joseph Koshakow <koshy44@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Minimal logical decoding on standbys