Skip site navigation (1) Skip section navigation (2)

Numeric casts in locale en_GB on FreeBSD 4.7

From: Andrew Grillet <andrew(at)grillet(dot)co(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Numeric casts in locale en_GB on FreeBSD 4.7
Date: 2003-10-25 20:32:36
Message-ID: 200310252132.36117.andrew@grillet.co.uk (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

I am unable to cast a string to float, any way I try.

This is FreeBSD Stable, with Postgresql 7.3.4. 

Most (probably) legit methods produce either a message to the effect 
that ' ##.##' is an illegal format or ' ' (ie a single space) is an 
illegal format.

Workaround is to use en_US as the locale for numerics.

Sorry exact message not retained, butI am not putting the system back to 
a non-working condition intentionally :-)

The documentation is not at all clear as to what should be a legal 
format string for converting text to numbers, only numbers to text. 

I think there should be a default  that works if you say 
to_number(variable);
(ie no format string) regardless of the locale. 

I am a new user, and assumed it was my mistake for a good 6 hours
of experimenting :-(

Andrew





Responses

pgsql-bugs by date

Next:From: Lynn.TilbyDate: 2003-10-26 02:45:22
Subject: Re: Numeric casts in locale en_GB on FreeBSD 4.7
Previous:From: Clifford T. MatthewsDate: 2003-10-25 02:59:24
Subject: rm -rf in initlocation violates Rule of Least Surprise

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group