Re: Current CVS has strange parser for float type

Started by Hannu Krosingover 23 years ago3 messageshackers
Jump to latest
#1Hannu Krosing
hannu@tm.ee

On Thu, 2002-10-17 at 23:34, Teodor Sigaev wrote:

wow=# select 5.3::float;
ERROR: Bad float8 input format '5.3'

Could it be something with locales ?

Try:

select 5,3::float;

-------------
Hannu

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hannu Krosing (#1)

Hannu Krosing <hannu@tm.ee> writes:

On Thu, 2002-10-17 at 23:34, Teodor Sigaev wrote:

wow=# select 5.3::float;
ERROR: Bad float8 input format '5.3'

Could it be something with locales ?

Oooh, bingo! On HPUX:

regression=# select 5.3::float;
float8
--------
5.3
(1 row)

regression=# set lc_numeric = 'de_DE.iso88591';
SET
regression=# select 5.3::float;
ERROR: Bad float8 input format '5.3'

I think this is a consequence of the changes made a little while back
(by Peter IIRC?) in locale handling. It used to be that we deliberately
did *not* allow any LC_ setting except LC_MESSAGES to actually take
effect globally in the backend, and this sort of problem is exactly
why. I think we need to revert some aspects of that change.

Bruce, this is a "must fix" open item ...

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)

Tom Lane wrote:

I think this is a consequence of the changes made a little while back
(by Peter IIRC?) in locale handling. It used to be that we deliberately
did *not* allow any LC_ setting except LC_MESSAGES to actually take
effect globally in the backend, and this sort of problem is exactly
why. I think we need to revert some aspects of that change.

Bruce, this is a "must fix" open item ...

Added.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/root/open_itemstext/plainDownload