Re: [PgFoundry] Unsigned Data Types [1 of 2] - Mailing list pgsql-patches

From Tom Lane
Subject Re: [PgFoundry] Unsigned Data Types [1 of 2]
Date
Msg-id 7416.1220766930@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PgFoundry] Unsigned Data Types [1 of 2]  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
List pgsql-patches
"Jaime Casanova" <jcasanov@systemguards.com.ec> writes:
> then the patch is right but it seems to me like that is broking the
> law of less surprise i expected -2::uint1 to be equivalent to
> (-2)::uint1 that should be at least documented, no?

See the precedence table here:
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-PRECEDENCE

:: binds more tightly than -, and always has.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]
Next
From: "Jaime Casanova"
Date:
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]