X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2CEA3D1B229 for ; Thu, 29 Jul 2004 15:49:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11261-01 for ; Thu, 29 Jul 2004 18:49:36 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id 486DDD1B241 for ; Thu, 29 Jul 2004 15:49:34 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1BqFyA-0000z7-00; Thu, 29 Jul 2004 14:49:34 -0400 To: "Merlin Moncure" Cc: , Subject: Re: best way to fetch next/prev record based on index References: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local> In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 29 Jul 2004 14:49:34 -0400 Message-ID: <87vfg6ps1t.fsf@stark.xeocode.com> Lines: 14 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/230 X-Sequence-Number: 7621 "Merlin Moncure" writes: > However, this would work: > Create index on t(stackparam(array[a::text,b::text,c::text), > array['char(2)', 'int', 'date')]; Well, I fear not all datatypes sort properly when treated as text. Notably integers don't. "10" sorts before "2" for example. You could probably deal with this with careful attention to each datatype you're converting if you're interested in going to that length. -- greg