Re: lc_time and localized dates - Mailing list pgsql-patches

From Euler Taveira de Oliveira
Subject Re: lc_time and localized dates
Date
Msg-id 481011DC.3050900@timbira.com
Whole thread Raw
In response to Re: lc_time and localized dates  (Bruce Momjian <bruce@momjian.us>)
Responses Re: lc_time and localized dates  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: lc_time and localized dates  (Bruce Momjian <bruce@momjian.us>)
List pgsql-patches
Bruce Momjian wrote:

> Euler, have you updated this patch yet?
>
Here is an updated patch. It follows the Oracle behaviour and uses a
cache mechanism to avoid calling setlocale() all the time. I unified the
localized_* and str_* functions.  I didn't test it on Windows. I would
appreciate some feedback.


euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth YYYY');
               to_char
-----------------------------------
  thu Qui Quinta apr ABR abril 2008
(1 registro)

euler=# set lc_time to 'it_IT.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth YYYY');
                to_char
-------------------------------------
  thu Gio Giovedì apr APR aprile 2008
(1 registro)

euler=# set lc_time to 'es_ES.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth YYYY');
               to_char
-----------------------------------
  thu Jue Jueves apr ABR abril 2008
(1 registro)

euler=# set lc_time to 'fr_FR.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth YYYY');
              to_char
----------------------------------
  thu Jeu Jeudi apr AVR avril 2008
(1 registro)

euler=# set lc_time to 'cs_CZ.UTF-8';
SET
euler=# select to_char(now(), 'dy tmDy tmDay mon tmMON tmmonth YYYY');
               to_char
-----------------------------------
  thu Čt Čtvrtek apr DUB duben 2008
(1 registro)


--
   Euler Taveira de Oliveira
   http://www.timbira.com/

Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patch to change psql default banner v6
Next
From: "Albe Laurenz"
Date:
Subject: Re: Improve shutdown during online backup, take 4