Re: [GENERAL] trouble with to_char('L')

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] trouble with to_char('L')
Date: 2010-04-26 13:32:11
Message-ID: 201004261332.o3QDWBM19719@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hiroshi Inoue wrote:
> Bruce Momjian wrote:
> > Takahiro Itagaki wrote:
> >> Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> >>
> >>> Revised patch attached. Please test it.
> >> I applied this version of the patch.
> >> Please check wheter the bug is fixed and any buildfarm failures.
> >
> > Great. I have merged in my C comments into the code with the attached
> > patch so we remember why the code is setup as it is.
> >
> > One thing I am confused about is that, for Win32, our numeric/monetary
> > handling sets lc_ctype to match numeric/monetary, while our time code in
> > the same file uses that method _and_ uses wcsftime() to return the value
> > in wide characters. So, why do we do both for time? Is there any value
> > to that?
>
> Unfortunately wcsftime() is a halfway conveniece function which uses
> ANSI version of functionalities internally.
> AFAIC the only way to remove the dependency to LC_CTYPE is to call
> GeLocaleInfoW() directly.

Thanks. I have documented this fact in a C comment; patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

Attachment Content-Type Size
/rtmp/diff text/x-diff 1.2 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2010-04-26 14:01:44 Re: Inheritance efficiency
Previous Message Eustace Scrubb 2010-04-26 11:45:18 Start-up script for few clusters: just add water?

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2010-04-26 13:40:56 Re: CIText and pattern_ops
Previous Message Robert Haas 2010-04-26 13:19:58 Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct