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 BF5459DC9BF; Thu, 16 Feb 2006 18:51:10 -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 35506-10; Thu, 16 Feb 2006 18:51:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 18CAF9DC9E2; Thu, 16 Feb 2006 18:51:05 -0400 (AST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1F9rxn-0003xW-00; Thu, 16 Feb 2006 17:51:03 -0500 To: Markus Schaber Cc: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index References: <43F38867.6010701@gpdnet.co.uk> <19510.1140036968@sss.pgh.pa.us> <19779.1140038874@sss.pgh.pa.us> <43F39E53.1020009@gpdnet.co.uk> <20781.1140046109@sss.pgh.pa.us> <7.0.1.0.2.20060215194635.03b55da0@earthlink.net> <21615.1140052893@sss.pgh.pa.us> <7.0.1.0.2.20060215223710.03a7c618@earthlink.net> <20060216113522.GA3461@uio.no> <7.0.1.0.2.20060216071053.0385a1a8@earthlink.net> <43F481CD.2010509@logix-tt.com> <43F4A7D8.4050907@modgraph-usa.com> <29277.1140110108@sss.pgh.pa.us> <1140128256.9076.254.camel@archimedes> <43F4FDCC.2000204@logix-tt.com> In-Reply-To: <43F4FDCC.2000204@logix-tt.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 16 Feb 2006 17:51:02 -0500 Message-ID: <871wy23okp.fsf@stark.xeocode.com> Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.13 required=5 tests=[AWL=0.130] X-Spam-Score: 0.13 X-Spam-Level: X-Archive-Number: 200602/645 X-Sequence-Number: 79783 Markus Schaber writes: > Hmm, to remove redundancy, I'd change the <= to a < and define: > > if a==b then f(a)==f(b) > if a > > Data types which could probably provide a useful function for f would be > > int2, int4, oid, and possibly int8 and text (at least for SQL_ASCII). How exactly do you imagine doing this for text? I could see doing it for char(n)/varchar(n) where n<=4 in SQL_ASCII though. -- greg