Re: integer input functions : interesting limit behaviour - Mailing list pgsql-hackers

From Tom Lane
Subject Re: integer input functions : interesting limit behaviour
Date
Msg-id 25882.1252419905@sss.pgh.pa.us
Whole thread Raw
In response to integer input functions : interesting limit behaviour  (Pierre Frédéric Caillaud<lists@peufeu.com>)
List pgsql-hackers
Pierre Frédéric Caillaud <lists@peufeu.com> 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 -(2147483648::INTEGER) so of course it fails.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: Time-based Releases WAS: 8.5 release timetable, again
Next
From: "Kevin Grittner"
Date:
Subject: Re: Triggers on columns