Fix formatting of Interval output

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема Fix formatting of Interval output
Дата
Msg-id CAAvxfHfjBGpsXccdbWyMMDXg8bn48ptfnEag9qwk8m5sziVs2A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fix formatting of Interval output
Список pgsql-hackers
When formatting the output of an Interval, we call abs() on the hours
field of the Interval. Calling abs(INT_MIN) returns back INT_MIN
causing the output to contain two '-' characters. The attached patch
fixes that issue by special casing INT_MIN hours.

Here is an example of the issue:
    postgres=# SELECT INTERVAL '-2147483648 hrs';
          interval
    --------------------
     --2147483648:00:00
    (1 row)


Cheers,
Joe Koshakow

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Assert in pageinspect with NULL pages
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Fix CheckIndexCompatible comment