dbTalk Databases Forums  

[BUGS] Numeric casts in locale en_GB on FreeBSD 4.7

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Numeric casts in locale en_GB on FreeBSD 4.7 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Grillet
 
Posts: n/a

Default [BUGS] Numeric casts in locale en_GB on FreeBSD 4.7 - 10-25-2003 , 03:35 PM






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





---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] Numeric casts in locale en_GB on FreeBSD 4.7 - 10-26-2003 , 03:27 PM






On Sat, 25 Oct 2003, Andrew Grillet wrote:

Quote:
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.
What statements were you trying exactly?

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.