Re: Bug with int2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug with int2
Дата
Msg-id 18526.1455680766@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug with int2  (Feng Tian <ftian@vitessedata.com>)
Список pgsql-hackers
Feng Tian <ftian@vitessedata.com> writes:
> I run into the following.   Seems this is a bug for -32768, which should be
> a valid smallint value.

> ftian=# select -32768::int2;
> ERROR:  smallint out of range

You have the wrong idea about the precedence of those operators.
"select (-32768)::int2" works.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How are CREATE EXTENSION ... VERSION or ALTER EXTENSION ... UPDATE TO ... intended to work?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Bug with int2