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

Re: lc_time and localized dates

From: "Gevik Babakhani" <pgdev(at)xs4all(dot)nl>
To: "'Euler Taveira de Oliveira'" <euler(at)timbira(dot)com>, "'PostgreSQL-patches'" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: lc_time and localized dates
Date: 2008-02-26 09:53:18
Message-ID: 008d01c8785d$6d66e290$0a01a8c0@gevmus (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
> Attached is a patch that replaces the lc_messages with 
> lc_time when using to_char in translation mode (TM) [1]. It 
> doesn't change the output behaviour. Per discussion [2], it's 
> using some cache mechanism so we don't need to call 
> setlocale() all the time.

Have you tested this patch on MSVC and MinGW (Windows) builds?
changing LC_MESSAGES/LC_TIME will most probably break the Windows behavior.

> Some issues:
> (i) some locales don't capitalize the first letter. I'm using
> pg_toupper() to do the job but I'm afraid it's not 
> appropriated. 

AFAIK, some locales like the Dutch doesn't have capitalized first letters
for month/day. 
Making the first letter capitalized for all values would be incorrect.


In response to


pgsql-patches by date

Next:From: Gevik BabakhaniDate: 2008-02-26 12:16:58
Subject: Re: lc_time and localized dates
Previous:From: Zdenek KotalaDate: 2008-02-26 09:24:08
Subject: Re: Fix pgstatindex using for large indexes

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