Re: Access to localized_str_tolower()

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Access to localized_str_tolower()
Date: 2008-07-01 18:11:16
Message-ID: 200807011811.m61IBGI03337@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David E. Wheeler wrote:
> 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).

That whole use of localized_* is gone in CVS HEAD --- we now have a
cleaner API.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-07-01 18:25:26 Re: Access to localized_str_tolower()
Previous Message Bruce Momjian 2008-07-01 18:09:28 Re: [PATCHES] TRUNCATE TABLE with IDENTITY