Re: setting up scan keys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: setting up scan keys
Date
Msg-id 19973.1251207195@sss.pgh.pa.us
Whole thread Raw
In response to setting up scan keys  ("Markus Wanner" <markus@bluegap.ch>)
Responses Re: setting up scan keys  ("Markus Wanner" <markus@bluegap.ch>)
List pgsql-hackers
"Markus Wanner" <markus@bluegap.ch> writes:
> Up until now I've used something along the following lines to setup  
> the scan keys for a BTGreaterStrategy scan:

>          procinfo = index_getprocinfo(index_rel, i + 1, BTORDER_PROC);
>          ScanKeyEntryInitializeWithInfo(&skeys[i],
>                                         SK_ROW_MEMBER,
>                                         (AttrNumber) (i + 1),
>                                         strategy,
>                                         InvalidOid,
>                                         procinfo,
>                                         value);

Either the SK_ROW_MEMBER flag is entirely wrong, or this is part of
a larger structure that you're not telling us about.  But also,
from anywhere outside the btree index AM itself you should not be
dealing in the support function.  The scankey is supposed to refer
to an operator's underlying function.  Your second try looks a bit
saner, but it's still using SK_ROW_MEMBER ... why?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: DELETE syntax on JOINS
Next
From: Werner Echezuria
Date:
Subject: return HeapTuple