Re: 8.1.2 -32768::smallint

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: 8.1.2 -32768::smallint
Дата
Msg-id 20061213154307.GA16823@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: 8.1.2 -32768::smallint  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
On Wed, Dec 13, 2006 at 08:34:38AM -0700, Michael Fuhr wrote:
> On Wed, Dec 13, 2006 at 03:03:43PM -0000, Jean-Gérard Pailloncy wrote:
> > On PostgreSQL 8.1.2
> > select -32768::smallint
> > throws the error
> > ERROR:  smallint out of range
>
> I think the cast is binding tighter than the unary minus,

Indeed it is; see the Operator Precedence table:

http://www.postgresql.org/docs/8.1/interactive/sql-syntax.html#SQL-PRECEDENCE

--
Michael Fuhr

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: 8.1.2 -32768::smallint
Следующее
От: Jean-Gérard Pailloncy
Дата:
Сообщение: Re: 8.1.2 -32768::smallint