Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits
Дата
Msg-id alpine.DEB.2.21.1810260759520.27686@lancre
обсуждение исходный текст
Ответ на Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
>> SELECT -2147483648::integer;
>> ERROR:  integer out of range
>
> It's just a precedence issue. :: binds with higher precedence, so the
> above is actually -(2147483648::integer), rather than
> (-2147483648)::integer. Therefore you get an overflow.

The error message may be nicer by expliciting the offending string, and/or 
locating it precisely within the query?

-- 
Fabien.


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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15459: no connection to the server
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits