Fix oversight in handling of row-comparison index keys: if the row comparison

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 2054724c085b354f83d59611b62b47b641226e59
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-01-07T01:56:24Z
Releases: 8.2.2
Fix oversight in handling of row-comparison index keys: if the row comparison
doesn't exactly match the index, we may have to change our initial positioning
strategy.  For example, given an index on (f1,f2,f3) and a WHERE condition
"ROW(f1,f3) > ROW(2,3)", the code extracted the initial-positioning condition
"f1 > 2", which is wrong ... it has to be "f1 >= 2", else some rows matching
the WHERE condition may fail to be returned.

Applying patch to 8.2 only --- I'll fix it in HEAD later as part of the
planned index improvements (reverse-sort and NULLS FIRST/LAST work).

Files

PathChange+/−
src/backend/access/nbtree/nbtsearch.c modified +38 −12