Hi,
I'm having a hard time using an index scan. So far, I've done quite well
with ScanKeyInit for equality searches. But now I need to scan an index
from a given starting point. Something like:
(x, y, z,...) > (const, const, const,...)
For the equality operatior, I've used get_sort_group_operators() in
combination with get_opcode() to pass that on as the sk_func of the scan
key. I slowly begin to doubt if that's correct at all.
While it works for equality scans, it does somehow not work for for
BTGreaterStrategy. What am I missing?
I do have the following: an indexStruct on the index (primary key) I
want to use, a TupleDescriptor for the relation I want tuples from and
of course the list of constants (datums) to compare against. I want to
do an index scan to retrieve tuples from that given lower bound upwards
(or forwards).
I don't quite grok all the opfamily and opclass things, yet. Hints and
pointers on where to read on greatly appreciated. A virtual beer for
sample code. ;-)
Regards
Markus Wanner