Re: How TODO prevent PQfnumber() from lowercasing? - Mailing list pgsql-hackers

From Volkan YAZICI
Subject Re: How TODO prevent PQfnumber() from lowercasing?
Date
Msg-id 7104a7370510140155y60ad99c3h384b4f626683f060@mail.gmail.com
Whole thread Raw
In response to Re: How TODO prevent PQfnumber() from lowercasing?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 10/13/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Really, PQfnumber shouldn't do any case folding at all; that's not in
> its charter if you ask me.  The problem is how to get there from here
> without too much compatibility pain.  Maybe invent a new routine that
> does it right and then deprecate the existing one?

Related with the ILIKE case (which requires lowercasing too), I've
been trying to implement a patch for MatchTextIC() in
backend/utils/adt/like_match.c and stucked at the same point with
PQfnumber() lowercasing. (Which is another bogus implementation.)

As I try and understand, it's so hard to implement a case processing
routine for both multi-byte and normal ASCII chars. wchar_t and char
types make comparisions really messy. By looking at some MySQL source
code, I suggest a new solution for string handling: If PostgreSQL is
compiled with --enable-mb parameter, then use wchar_t instead of char
in every string operation. I'm aware of the required huge
implementation for this purpose, but IMHO things will be at the right
position. It's a MB char or ASCII, not both. That's all.

Any opinions?


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Allowed timezone values
Next
From: Thomas Hallgren
Date:
Subject: Re: Link problems with HEAD