Re: [GENERAL] Localization trouble

2007-07-06 Thread Michael Glaesemann
On Jul 5, 2007, at 20:59 , Tom Lane wrote: Michael Glaesemann <[EMAIL PROTECTED]> writes: I think display depends on whether or not you configured Postgres with or without --enable-nls. No, to_char understands numeric locales regardless of enable-nls. There is no provision for locale-depende

Re: [GENERAL] Localization trouble

2007-07-05 Thread Chris Travers
Tom Lane wrote: Chris Travers <[EMAIL PROTECTED]> writes: Is there a way to accept localized numbers as input? i.e. '1,39'::numeric? See to_number(). Thanks! I somehow missed that function in the docs. Best Wishes, Chris Travers ---(end of broadcast)

Re: [GENERAL] Localization trouble

2007-07-05 Thread Tom Lane
Chris Travers <[EMAIL PROTECTED]> writes: > Is there a way to accept localized numbers as input? > i.e. '1,39'::numeric? See to_number(). regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] Localization trouble

2007-07-05 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > I think display depends on whether or not you configured Postgres > with or without --enable-nls. No, to_char understands numeric locales regardless of enable-nls. There is no provision for locale-dependent output from a plain numeric column; you

Re: [GENERAL] Localization trouble

2007-07-05 Thread Chris Travers
Michael Fuhr wrote: I think you'll need to use to_char(): test=> set lc_numeric to 'es_ES.UTF-8'; SET test=> select to_char(1.234, '9D999'); to_char - 1,234 (1 row) The file src/backend/utils/adt/pg_locale.c in the PostgreSQL source code has comments about how various LC_* sett

Re: [GENERAL] Localization trouble

2007-07-05 Thread Michael Glaesemann
On Jul 5, 2007, at 19:47 , Michael Glaesemann wrote: I don't believe you'll see numbers *as numbers* displayed with the formatting you desire unless you somehow tell your client (e.g., psql) which locale you want to use. I haven't figured out how to do this yet, though. I think display d

Re: [GENERAL] Localization trouble

2007-07-05 Thread Michael Fuhr
On Thu, Jul 05, 2007 at 05:10:57PM -0700, Chris Travers wrote: > I am trying to find a way to select the number format at runtime for > textual representation of numbers. I am currently running 8.1.4 built > from source on Fedora Linux core 5. > > I have been trying to use set lc_numeric = vari

Re: [GENERAL] Localization trouble

2007-07-05 Thread Michael Glaesemann
On Jul 5, 2007, at 19:10 , Chris Travers wrote: I have been trying to use set lc_numeric = various country codes (for example es_EC), but I am not able to get the format to change from 1.00 to 1,00. Any hints as to what I could be doing wrong? Does this correspond to what you're seeing?