Re: 8.1.2 -32768::smallint

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jean-Gérard Pailloncy <jg(at)rilk(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 8.1.2 -32768::smallint
Date: 2006-12-13 15:43:07
Message-ID: 20061213154307.GA16823@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jean-Gérard Pailloncy 2006-12-13 16:00:25 Re: 8.1.2 -32768::smallint
Previous Message Michael Fuhr 2006-12-13 15:34:38 Re: 8.1.2 -32768::smallint