Re: BUG #1526: SHRT_MIN out of range on explicit type conversion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1526: SHRT_MIN out of range on explicit type conversion
Дата
Msg-id 14097.1109998160@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1526: SHRT_MIN out of range on explicit type conversion  ("Kelly Burkhart" <pgkrb@kkcsm.net>)
Список pgsql-bugs
"Kelly Burkhart" <pgkrb@kkcsm.net> writes:
> From psql, the following will fail:

> select -32768::int2;

This is not a bug.  The reason is that :: binds more tightly than -,
so what you have written is equivalent to

select -(32768::int2);

which obviously *should* fail.  Try it as

select (-32768)::int2;

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1527: select retrieves 0 rows after vacuum analyze
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: BUG #1525: wrong time when getting timestamp from date