Re: Access to localized_str_tolower() - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Access to localized_str_tolower()
Date
Msg-id 6F23FA17-E1C8-4BE9-B048-F5CB0F939290@kineticode.com
Whole thread Raw
In response to Re: Access to localized_str_tolower()  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Access to localized_str_tolower()  (Bruce Momjian <bruce@momjian.us>)
Re: Access to localized_str_tolower()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jul 1, 2008, at 10:38, Bruce Momjian wrote:

>> Oh, and on a side note, should I localized_str_tolower() or just
>> str_tolower()?
>
> I am not sure what localized_str_tolower() is but I think you should
> call  str_tolower directly if you want to pass char*, and lower() if  
> you
> want to pass 'text'.
From formatting.c in 8.3.1:

#if defined(HAVE_WCSTOMBS) && defined(HAVE_TOWLOWER)
#define USE_WIDE_UPPER_LOWER
/* externs are in oracle_compat.c */
extern char *wstring_upper(char *str);
extern char *wstring_lower(char *str);

static char *localized_str_toupper(char *buff);
static char *localized_str_tolower(char *buff);
#else
#define localized_str_toupper str_toupper
#define localized_str_tolower str_tolower
#endif

So I assumed it was preferred. FWIW, str_tolower() doesn't work in  
8.3, either (note that it is not declared in formatting.h the way it  
is in CVS HEAD).

Best,




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Access to localized_str_tolower()
Next
From: Magnus Hagander
Date:
Subject: Re: Fairly serious bug induced by latest guc enum changes