Re: best way to fetch next/prev record based on index - Mailing list pgsql-performance

From Greg Stark
Subject Re: best way to fetch next/prev record based on index
Date
Msg-id 876587spxw.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: best way to fetch next/prev record based on index  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: best way to fetch next/prev record based on index
List pgsql-performance
Tom Lane <tgl@sss.pgh.pa.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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: best way to fetch next/prev record based on index
Next
From: Tom Lane
Date:
Subject: Re: best way to fetch next/prev record based on index