Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group