Re: INTEGER range ("-2147483648" is not accepted.)

Поиск
Список
Период
Сортировка
От Satoshi Nagayasu
Тема Re: INTEGER range ("-2147483648" is not accepted.)
Дата
Msg-id 4C207B8B.4030104@gmail.com
обсуждение исходный текст
Ответ на Re: INTEGER range ("-2147483648" is not accepted.)  (Thom Brown <thombrown@gmail.com>)
Список pgsql-docs
Magnus,

Thanks for your advice. I've understood how it happens.

However, it looks tricky and difficult to understand,
so I hope that the message could be more understandable
as Thom mentioned.

Regards,

On 2010/06/22 17:48, Thom Brown wrote:
> On 22 June 2010 09:44, Magnus Hagander<magnus@hagander.net>  wrote:
>> On Tue, Jun 22, 2010 at 10:27 AM, Satoshi Nagayasu
>> <satoshi.nagayasu@gmail.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
>


--
NAGAYASU Satoshi <satoshi.nagayasu@gmail.com>

В списке pgsql-docs по дате отправления:

Предыдущее
От: Satoshi Nagayasu
Дата:
Сообщение: Re: INTEGER range ("-2147483648" is not accepted.)
Следующее
От: Bruce Momjian
Дата:
Сообщение: pg_ctl server log differenes on win32