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

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

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Bruce Momjian <bruce(at)momjian(dot)us>
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 00:19:49
Message-ID: 4BD4DC25.9090003@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
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.

regards,
Hiroshi Inoue



In response to

Responses

pgsql-hackers by date

Next:From: Jim NasbyDate: 2010-04-26 01:02:47
Subject: Re: inlining SQL functions
Previous:From: Tom LaneDate: 2010-04-25 23:18:48
Subject: Re: testing HS/SR - 1 vs 2 performance

pgsql-general by date

Next:From: Josh KupershmidtDate: 2010-04-26 02:59:09
Subject: Re: Lock table, best option?
Previous:From: Tom LaneDate: 2010-04-25 23:35:03
Subject: Re: Plpgsql function syntax error at first coalesce statement

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