| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> | 
|---|---|
| To: | Jens-Wolfhard Schicke <j(dot)schicke(at)asco(dot)de> | 
| Cc: | Dann Corbit <DCorbit(at)connx(dot)com>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: qsort again (was Re: [PERFORM] Strange Create Index | 
| Date: | 2006-02-17 09:17:49 | 
| Message-ID: | 20060217091749.GA9254@svana.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers pgsql-performance | 
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(at)svana(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ragnar | 2006-02-17 09:24:21 | Re: [HACKERS] qsort again (was Re: Strange Create | 
| Previous Message | Christian Bird | 2006-02-17 08:26:03 | who is pgsql in cvs | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ragnar | 2006-02-17 09:24:21 | Re: [HACKERS] qsort again (was Re: Strange Create | 
| Previous Message | Jens-Wolfhard Schicke | 2006-02-17 08:18:39 | Re: qsort again (was Re: [PERFORM] Strange Create Index |