Thread: General Bug Report: Error parsing negative numbers

General Bug Report: Error parsing negative numbers

From
Unprivileged user
Date:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Sverre H. Huseby
Your email address      : shh@computas.no

Category                : unknown
Severity                : serious

Summary: Error parsing negative numbers

System Configuration
--------------------
  Operating System   : Linux, Solaris

  PostgreSQL version : 6.5

  Compiler used      : egcs (Linux), gcc (Solaris)

Hardware:
---------
2.0.34, pentium

Versions of other tools:
------------------------


--------------------------------------------------------------------------

Problem Description:
--------------------
Negative numbers with more than a certain number og
digits produce an error message when being parsed.
Didn't see this problem on 6.4.x.

--------------------------------------------------------------------------

Test Case:
----------
wox=> select -0.123456789012345;
          ?column?
------------------
-0.123456789012345
(1 row)

wox=> select -0.1234567890123456;
ERROR:  Unable to convert left operator '-' from type 'unknown'


--------------------------------------------------------------------------

Solution:
---------
I flagged this as serious, as applications that worked
before may stop working (as happened for me). The temporary
solution is to rewrite applications to limit the number
of digits sent to PostgreSQL.

--------------------------------------------------------------------------


Re: [BUGS] General Bug Report: Error parsing negative numbers

From
Oleg Bartunov
Date:
Just tried on my Linux 2.0.37, latest 6.5 cvs, compiled by egcs

test=> select -0.123456789012345;
          ?column?
------------------
-0.123456789012345(1 row)

test=> select version();
version
------------------------------------------------------------------------
PostgreSQL 6.5.0 on i686-pc-linux-gnulibc1, compiled by gcc egcs-2.91.66
(1 row)


    Regards.

        Oleg


On Mon, 21 Jun 1999, Unprivileged user wrote:

> Date: Mon, 21 Jun 1999 03:49:00 -0400 (EDT)
> From: Unprivileged user <nobody@hub.org>
> Reply-To: "Sverre H. Huseby" <shh@computas.no>
> To: pgsql-bugs@postgreSQL.org
> Subject: [BUGS] General Bug Report: Error parsing negative numbers
>
>
> ============================================================================
>                         POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name               : Sverre H. Huseby
> Your email address      : shh@computas.no
>
> Category                : unknown
> Severity                : serious
>
> Summary: Error parsing negative numbers
>
> System Configuration
> --------------------
>   Operating System   : Linux, Solaris
>
>   PostgreSQL version : 6.5
>
>   Compiler used      : egcs (Linux), gcc (Solaris)
>
> Hardware:
> ---------
> 2.0.34, pentium
>
> Versions of other tools:
> ------------------------
>
>
> --------------------------------------------------------------------------
>
> Problem Description:
> --------------------
> Negative numbers with more than a certain number og
> digits produce an error message when being parsed.
> Didn't see this problem on 6.4.x.
>
> --------------------------------------------------------------------------
>
> Test Case:
> ----------
> wox=> select -0.123456789012345;
>           ?column?
> ------------------
> -0.123456789012345
> (1 row)
>
> wox=> select -0.1234567890123456;
> ERROR:  Unable to convert left operator '-' from type 'unknown'
>
>
> --------------------------------------------------------------------------
>
> Solution:
> ---------
> I flagged this as serious, as applications that worked
> before may stop working (as happened for me). The temporary
> solution is to rewrite applications to limit the number
> of digits sent to PostgreSQL.
>
> --------------------------------------------------------------------------
>
>

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83