Re: qsort again (was Re: [PERFORM] Strange Create Index - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: qsort again (was Re: [PERFORM] Strange Create Index
Date
Msg-id 20060217091749.GA9254@svana.org
Whole thread Raw
In response to Re: qsort again (was Re: [PERFORM] Strange Create Index  (Jens-Wolfhard Schicke <ml+pgsql-hackers@asco.de>)
List pgsql-hackers
On Fri, Feb 17, 2006 at 09:18:39AM +0100, Jens-Wolfhard Schicke wrote:
> What I think as the biggest problem is the digit representation necessary
> for Radix-Sort in cases of locales which sort without looking at spaces. I
> assume that would be hard to implement. The same goes for the proposed
> mapping of string values onto 4/8-byte values.

Actually, this is easy. The standard C library provides strxfrm() and
other locale toolkits like ICU provide ucol_getSortKey(). Windows
provides LCMapString(). Just pass each string through this and take the
first four bytes of the result to form your integer key.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Jens-Wolfhard Schicke
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Next
From: Markus Schaber
Date:
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index