Re: to_number behavior change between 8.1 and 8.2

From: Richard Huxton <dev(at)archonet(dot)com>
To: Richard Greenwood <richard(dot)greenwood(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: to_number behavior change between 8.1 and 8.2
Date: 2007-05-16 18:02:36
Message-ID: 464B473C.2020404@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message marcelo Cortez 2007-05-16 18:04:36 Re: dns less connection
Previous Message Richard Greenwood 2007-05-16 17:56:53 to_number behavior change between 8.1 and 8.2