Re: 7.4.1 release status - Turkish Locale

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.4.1 release status - Turkish Locale
Дата
Msg-id 9106.1077338207@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 7.4.1 release status - Turkish Locale  ("Nicolai Tufar" <ntufar@pisem.net>)
Ответы Re: 7.4.1 release status - Turkish Locale  ("Nicolai Tufar" <ntufar@pisem.net>)
Список pgsql-hackers
"Nicolai Tufar" <ntufar@pisem.net> writes:
> Under locale-ignorant FreeBSD it works fine.
> But under Fedora Core 1 initdb it crashes under all
> locales I tested -C, en_US, tr_TR with message given below.

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...
        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
currentDEFAULT 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
DEFAULTstate is to fetch
 
***************
*** 474,480 ****                 HasCTZSet = true;             }         }
!         else if (strcasecmp(value, "UNKNOWN") == 0)         {             /*              * UNKNOWN is the value
shownas the "default" for TimeZone in
 
--- 479,485 ----                 HasCTZSet = true;             }         }
!         else if (strcasecmp(value, "unknown") == 0)         {             /*              * UNKNOWN is the value
shownas the "default" for TimeZone in
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Scott Goodwin
Дата:
Сообщение: Mac OS X, PostgreSQL, PL/Tcl
Следующее
От: Tom Lane
Дата:
Сообщение: Too-many-files errors on OS X