"Nicolai Tufar" <[EMAIL PROTECTED]> 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 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster