Skip site navigation (1) Skip section navigation (2)

Re: best way to fetch next/prev record based on index

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>,Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>,Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: best way to fetch next/prev record based on index
Date: 2004-07-28 22:54:35
Message-ID: 876587spxw.fsf@stark.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-performance
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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


In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2004-07-28 23:11:06
Subject: Re: best way to fetch next/prev record based on index
Previous:From: Stephane TessierDate: 2004-07-28 17:08:06
Subject: my boss want to migrate to ORACLE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group