Re: [PgFoundry] Unsigned Data Types [1 of 2]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: "Ryan Bradetich" <rbradetich(at)gmail(dot)com>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]
Date: 2008-09-07 05:55:30
Message-ID: 7416.1220766930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Jaime Casanova 2008-09-07 06:30:53 Re: [PgFoundry] Unsigned Data Types [1 of 2]
Previous Message Jaime Casanova 2008-09-07 05:46:40 Re: [PgFoundry] Unsigned Data Types [1 of 2]