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

Re: Solve a problem of LC_TIME of windows.

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Solve a problem of LC_TIME of windows.
Date: 2009-01-07 05:09:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> wrote:

> Seems LC_CTYPE and LC_TIME should be convertible even though we use
> wcsftime (which internally calls strftime?).

Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting
(at least encoding) on Windows.

The attached patch is an updated version to fix cache_locale_time().
Now it sets LC_TIME and LC_CTYPE to the specified locale and restore
them at end of the function. I tested the patch on Windows XP Japanese
Edition (SJIS) with UTF-8 and EUCJP databases, and worked expectedly.

"#ifdef WIN32" codes seems to be ugly in the patch,
but I have no other idea...

ITAGAKI Takahiro
NTT Open Source Software Center

Attachment: pg_locale-2009-01-07.diff
Description: application/octet-stream (2.6 KB)

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2009-01-07 05:15:48
Subject: Do we still need constraint_exclusion?
Previous:From: Robert HaasDate: 2009-01-07 04:49:57
Subject: Re: Proposed Patch to Improve Performance of Multi-BatchHash Join for Skewed Data Sets

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2009-01-07 13:22:52
Subject: Re: Solve a problem of LC_TIME of windows.
Previous:From: Devrim GÜNDÜZDate: 2009-01-06 17:19:59
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version1

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