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 EC211D1B195 for ; Wed, 28 Jul 2004 19:54:48 -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 03201-04 for ; Wed, 28 Jul 2004 22:54:42 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id DE413D1B182 for ; Wed, 28 Jul 2004 19:54:39 -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 1BpxJj-0006kh-00; Wed, 28 Jul 2004 18:54:35 -0400 To: Tom Lane Cc: Greg Stark , Stephan Szabo , Merlin Moncure , pgsql-performance@postgresql.org Subject: Re: best way to fetch next/prev record based on index References: <6EE64EF3AB31D5448D0007DD34EEB34101AEFF@Herge.rcsinc.local> <20040727204057.S28969@megazone.bigpanda.com> <87oem0u182.fsf@stark.xeocode.com> <21449.1091023621@sss.pgh.pa.us> <87y8l4rujq.fsf@stark.xeocode.com> <23584.1091033781@sss.pgh.pa.us> In-Reply-To: <23584.1091033781@sss.pgh.pa.us> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 28 Jul 2004 18:54:35 -0400 Message-ID: <876587spxw.fsf@stark.xeocode.com> Lines: 16 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/219 X-Sequence-Number: 7610 Tom Lane writes: > One thing I did not like about your first pass is that it makes > unsupportable assumptions about there being a semantic relationship > between operators named, say, '<' and '<='. Hm, I think I even had caught that issue on the mailing list previously. In that case though, it seems even the existing code is insufficient. Instead of testing whether the operator with strcmp against "=" and "<>" it should perhaps be looking for an operator class and the strategy number for the operator and its negator. -- greg