Re: to_number behavior change between 8.1 and 8.2 - Mailing list pgsql-general

From Richard Huxton
Subject Re: to_number behavior change between 8.1 and 8.2
Date
Msg-id 464B473C.2020404@archonet.com
Whole thread Raw
In response to to_number behavior change between 8.1 and 8.2  ("Richard Greenwood" <richard.greenwood@gmail.com>)
List pgsql-general
Richard Greenwood wrote:
> I am getting an error from to_number() in PostgreSQL 8.2 that does not
> occur in 8.1:
>   invalid input syntax for type numeric: " "
> I assume that it is rejecting spaces, so I tried trimming with:
>   to_number(trim (both ' ' from streetnum),'999999999')
> but still get the same error.
>
> Any suggestions?

I seem to recall it was tightened up - you'll need to give it a valid
number. What number is '' supposed to be?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: to_number behavior change between 8.1 and 8.2
Next
From: Ron Mayer
Date:
Subject: Re: stats collector spins my disk up every 500ms (8.2.3)