Re: Potential to_char localization bug - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Potential to_char localization bug
Date
Msg-id 20061127144559.GF4432@alvh.no-ip.org
Whole thread Raw
In response to Potential to_char localization bug  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> Here is a localization bug waiting to happen:
> 
> static char *
> localize_month_full(int index)
> {
>         char       *m = NULL;
> 
>         switch (index)
>         {
>                 case 4:
>                         m = _("May");
>                         break;
> 
> 
> static char *
> localize_month(int index)
> {
>         char       *m = NULL;
> 
>         switch (index)
>         {
>                 case 4:
>                         m = _("May");
>                         break;
> 
> 
> Haven't thought of a fix yet.

Build a table/function to return short names for full month names, and
use full-length month names on localize_month?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Incrementing INET fields
Next
From: Andrew Dunstan
Date:
Subject: Re: tiny fix needed