X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6F25B9DCB79 for ; Fri, 17 Feb 2006 05:17:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77148-05 for ; Fri, 17 Feb 2006 05:18:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.94.225]) by postgresql.org (Postfix) with ESMTP id D6A049DCAEE for ; Fri, 17 Feb 2006 05:17:56 -0400 (AST) Received: from kleptog by svana.org with local (Exim 4.50) id 1FA1kL-0002WN-NG; Fri, 17 Feb 2006 20:17:49 +1100 Date: Fri, 17 Feb 2006 10:17:49 +0100 From: Martijn van Oosterhout To: Jens-Wolfhard Schicke Cc: Dann Corbit , pgsql-hackers@postgresql.org Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index Message-ID: <20060217091749.GA9254@svana.org> Reply-To: Martijn van Oosterhout References: <97E2D852E73713354532B531@[192.168.1.72]> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <97E2D852E73713354532B531@[192.168.1.72]> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.123 required=5 tests=[AWL=0.123] X-Spam-Score: 0.123 X-Spam-Level: X-Archive-Number: 200602/654 X-Sequence-Number: 79792 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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= =20 > for Radix-Sort in cases of locales which sort without looking at spaces. = I=20 > assume that would be hard to implement. The same goes for the proposed=20 > 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, --=20 Martijn van Oosterhout 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. --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD9ZS9IB7bNG8LQkwRAlazAJ9EDy9ArrtWpDkv5ZjceLU0wfQs9gCffxWW 5nKKZj3XPYrJD5IY2t4pS1Q= =EGOa -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--