"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