From: | Thom Brown <thombrown(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Satoshi Nagayasu <satoshi(dot)nagayasu(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: INTEGER range ("-2147483648" is not accepted.) |
Date: | 2010-06-22 08:48:49 |
Message-ID: | AANLkTikurALoXoquO_9FQpUACFM63olN87ofi_zYGRJz@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On 22 June 2010 09:44, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Tue, Jun 22, 2010 at 10:27 AM, Satoshi Nagayasu
> <satoshi(dot)nagayasu(at)gmail(dot)com> wrote:
>> Hi all,
>>
>> I've found a bit strange thing on the INTEGER range in the official manual.
>>
>> http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html
>>
>> According to the official manual, the INTEGER range is "-2147483648 to +2147483647".
>> However, my example in below shows that "-2147483648" is not accepted.
>>
>> Is this correct? Any suggestions?
>>
>> template1=# SELECT -2147483648::integer;
>> ERROR: integer out of range
>
> This gets parsed as "cast 2147483648 to integer
Why? And if so, it would probably be more useful if the error message
was something more like:
ERROR: integer 2147483648 out of range
That would at least show the user what the value was seen as by the parser.
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Satoshi Nagayasu | 2010-06-22 08:59:55 | Re: INTEGER range ("-2147483648" is not accepted.) |
Previous Message | Magnus Hagander | 2010-06-22 08:44:42 | Re: INTEGER range ("-2147483648" is not accepted.) |