Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits
От | Andres Freund |
---|---|
Тема | Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits |
Дата | |
Msg-id | 20181026062430.653yvpzjweuketkb@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: BUG #15458: pg_typeof inconsistency on negative integer constantlimits (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: BUG #15458: pg_typeof inconsistency on negative integer constant limits
|
Список | pgsql-bugs |
Hi, On 2018-10-26 08:02:59 +0200, Fabien COELHO wrote: > > > > 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? Including the string would make the function not leak proof though, so that seems like a no-go. Location would be possible, but there's some architectural issues around doing so at execution time - we only really have the setup to do so at parse time currently. Tom was looking to change that at some point however, iirc. Greetings, Andres Freund
В списке pgsql-bugs по дате отправления: