Re: [HACKERS] Numeric with '-'

Поиск
Список
Период
Сортировка
От Brian Hirt
Тема Re: [HACKERS] Numeric with '-'
Дата
Msg-id 20000221015437.A356@loopy.berkhirt.com
обсуждение исходный текст
Ответ на Numeric with '-'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Ответы RE: [HACKERS] Numeric with '-'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Re: [HACKERS] Numeric with '-'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
A strange thing I noticed with this is that

"select -234567890.1234567;" works and
"select -1234567890.123456;" also works while
"select -1234567890.1234567;" does not.  That
extra character just seems to push things over
the edge.

It almost seems like there is some sort of length
restriction somewhere in the parser.

On Mon, Feb 21, 2000 at 04:06:07PM +0900, Hiroshi Inoue wrote:
> Hi,
> 
> The following phenomenon was reported to pgsql-jp(ML in Japan).
> 
> rest=# select -1234567890.1234567;
> ERROR:  Unable to convert left operator '-' from type 'unknown'
> 
> -1234567890.1234567 is treated as - '1234567890.1234567'
> as the following comment in scan.l says.
> 
>  /* we no longer allow unary minus in numbers.
>  * instead we pass it separately to parser. there it gets
>  * coerced via doNegate() -- Leon aug 20 1999
>  */
> 
> However doNegate() does nothing for SCONST('1234567890.1234567').
> I don't understand where or how to combine '-' and numeric SCONST.
> 
> Regards.
> 
> Hiroshi Inoue
> Inoue@tpf.co.jp
> 
> ************

-- 
The world's most ambitious and comprehensive PC game database project.
                     http://www.mobygames.com


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

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Numeric with '-'
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Numeric with '-'