Re: 7.4.1 release status - Turkish Locale - Mailing list pgsql-hackers

From Nicolai Tufar
Subject Re: 7.4.1 release status - Turkish Locale
Date
Msg-id 000001c3f84f$ab542870$6400a8c0@ntufar
Whole thread Raw
In response to Re: 7.4.1 release status - Turkish Locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 7.4.1 release status - Turkish Locale
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Hmm.  It seems that tr_TR has problems much more extensive than you've
> indicated previously.  I was able to get through initdb with the
attached
> additional patch, but the regression tests fail in several places.
> It looks to me like every use of strcasecmp in the backend has to be
> questioned if we're going to make this work.  I'm starting to lean in
> the direction of "tr_TR is hopelessly broken" again...

With this patch applied everything works fine. Thanks!
What do you plan to do? Apply it? And if apply, will
You apply both of the modifications to 7.5devel also?

Thanks again for your effort.

Best regards,
Nicolai




> 
>             regards, tom lane
> 
> 
> *** src/backend/commands/variable.c~    Mon Jan 19 14:04:40 2004
> --- src/backend/commands/variable.c    Fri Feb 20 23:16:16 2004
> ***************
> *** 82,103 ****
> 
>           /* Ugh. Somebody ought to write a table driven version
-- mjl
> */
> 
> !         if (strcasecmp(tok, "ISO") == 0)
>           {
>               newDateStyle = USE_ISO_DATES;
>               scnt++;
>           }
> !         else if (strcasecmp(tok, "SQL") == 0)
>           {
>               newDateStyle = USE_SQL_DATES;
>               scnt++;
>           }
> !         else if (strncasecmp(tok, "POSTGRES", 8) == 0)
>           {
>               newDateStyle = USE_POSTGRES_DATES;
>               scnt++;
>           }
> !         else if (strcasecmp(tok, "GERMAN") == 0)
>           {
>               newDateStyle = USE_GERMAN_DATES;
>               scnt++;
> --- 82,108 ----
> 
>           /* Ugh. Somebody ought to write a table driven version
-- mjl
> */
> 
> !         /*
> !          * Note: SplitIdentifierString already downcased the
input, so
> !          * we needn't use strcasecmp here.
> !          */
> !
> !         if (strcmp(tok, "iso") == 0)
>           {
>               newDateStyle = USE_ISO_DATES;
>               scnt++;
>           }
> !         else if (strcmp(tok, "sql") == 0)
>           {
>               newDateStyle = USE_SQL_DATES;
>               scnt++;
>           }
> !         else if (strncmp(tok, "postgres", 8) == 0)
>           {
>               newDateStyle = USE_POSTGRES_DATES;
>               scnt++;
>           }
> !         else if (strcmp(tok, "german") == 0)
>           {
>               newDateStyle = USE_GERMAN_DATES;
>               scnt++;
> ***************
> *** 105,129 ****
>               if (ocnt == 0)
>                   newDateOrder = DATEORDER_DMY;
>           }
> !         else if (strcasecmp(tok, "YMD") == 0)
>           {
>               newDateOrder = DATEORDER_YMD;
>               ocnt++;
>           }
> !         else if (strcasecmp(tok, "DMY") == 0 ||
> !                  strncasecmp(tok, "EURO", 4) == 0)
>           {
>               newDateOrder = DATEORDER_DMY;
>               ocnt++;
>           }
> !         else if (strcasecmp(tok, "MDY") == 0 ||
> !                  strcasecmp(tok, "US") == 0 ||
> !                  strncasecmp(tok, "NONEURO", 7) == 0)
>           {
>               newDateOrder = DATEORDER_MDY;
>               ocnt++;
>           }
> !         else if (strcasecmp(tok, "DEFAULT") == 0)
>           {
>               /*
>                * Easiest way to get the current DEFAULT state
is to
> fetch
> --- 110,134 ----
>               if (ocnt == 0)
>                   newDateOrder = DATEORDER_DMY;
>           }
> !         else if (strcmp(tok, "ymd") == 0)
>           {
>               newDateOrder = DATEORDER_YMD;
>               ocnt++;
>           }
> !         else if (strcmp(tok, "dmy") == 0 ||
> !                  strncmp(tok, "euro", 4) == 0)
>           {
>               newDateOrder = DATEORDER_DMY;
>               ocnt++;
>           }
> !         else if (strcmp(tok, "mdy") == 0 ||
> !                  strcmp(tok, "us") == 0 ||
> !                  strncmp(tok, "noneuro", 7) == 0)
>           {
>               newDateOrder = DATEORDER_MDY;
>               ocnt++;
>           }
> !         else if (strcmp(tok, "default") == 0)
>           {
>               /*
>                * Easiest way to get the current DEFAULT state
is to
> fetch
> ***************
> *** 474,480 ****
>                   HasCTZSet = true;
>               }
>           }
> !         else if (strcasecmp(value, "UNKNOWN") == 0)
>           {
>               /*
>                * UNKNOWN is the value shown as the "default"
for
> TimeZone in
> --- 479,485 ----
>                   HasCTZSet = true;
>               }
>           }
> !         else if (strcasecmp(value, "unknown") == 0)
>           {
>               /*
>                * UNKNOWN is the value shown as the "default"
for
> TimeZone in



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Mac OS X, PostgreSQL, PL/Tcl
Next
From: "Thomas Hallgren"
Date:
Subject: Pl/Java - next step?