Hello Tom, Quoting "Tom Lane" <t...@sss.pgh.pa.us>:
Either the SK_ROW_MEMBER flag is entirely wrong..
Uhm.. yes, that's it. I've been under the impression that for an index scan with multiple attributes, I need to assemble scan keys with SK_ROW_MEMBER, SK_ROW_END and SK_ROW_HEADER. I now realize that's plain wrong and I can simply provide as many scan keys as I have attributes to scan for, without fiddling with any flag or subtype. The code in question now uses the simpler ScanKeyInit() and looks as follows:
for (i = 0; i < numKeys; i++) { attnum = idx_info->ii_KeyAttrNumbers[i]; get_sort_group_operators(tdesc->attrs[attnum - 1]->atttypid, false, true, false, NULL, &eq_func, NULL); ScanKeyInit(&skeys[i], i + 1, BTEqualStrategyNumber, get_opcode(eq_func), values[attnum - 1]); } Thank you very much for your help, that quickly got me on track again. Regards Markus Wanner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers