Re: numeric_to_number() function skipping some digits - Mailing list pgsql-hackers

From Tom Lane
Subject Re: numeric_to_number() function skipping some digits
Date
Msg-id 24897.1253287559@sss.pgh.pa.us
Whole thread Raw
In response to numeric_to_number() function skipping some digits  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Responses Re: numeric_to_number() function skipping some digits
List pgsql-hackers
Jeevan Chalke <jeevan.chalke@enterprisedb.com> writes:
> With PG84, I have tried something like this which seem incorrect to me.

> # SELECT '' AS to_number_2,  to_number('-347,58', '99G999');

Well, the input doesn't actually match the format, so I'm not totally
excited about this.  You do get sane results from:

regression=# select to_number('-347,58', '999G99');to_number 
-----------   -34758
(1 row)

Should we have it throw an error if the input corresponding to a G
symbol doesn't match the expected group separator?  I'm concerned that
that would break applications that work okay today.
        regards, tom lane


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: happy birthday Tom Lane ...
Next
From: Simon Riggs
Date:
Subject: Re: Hot Standby 0.2.1