Re: [HACKERS] integer input functions : interesting limit behaviour

2009-09-08 Thread Tom Lane
=?utf-8?Q?Pierre_Fr=C3=A9d=C3=A9ric_Caillau?= =?utf-8?Q?d?= writes: > * Here, the most negative value is sometimes accepted, sometimes not : > test=> SELECT -2147483648::INTEGER; > ERREUR: entier en dehors des limites You're confused about the operator precedence: the above is treated as -(214

[HACKERS] integer input functions : interesting limit behaviour

2009-09-08 Thread Pierre Frédéric Caillau d
I was looking in the int*in() functions and found some interesting limit behaviours : * Here, the most negative value is sometimes accepted, sometimes not : test=> SELECT -2147483648::INTEGER; ERREUR: entier en dehors des limites test=> SELECT '-2147483648'::INTEGER; int4