mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Update obsolete nbtree array preprocessing comments.
The array->scan_key references fixed up at the end of preprocessing start out as offsets into the arrayKeyData[] array (the array returned by _bt_preprocess_array_keys at the start of preprocessing that involves array scan keys). Offsets into the arrayKeyData[] array are no longer guaranteed to be valid offsets into our original scan->keyData[] input scan key array, but comments describing the array->scan_key references still talked about scan->keyData[]. Update those comments. Oversight in commit b5249741.
This commit is contained in:
parent
62ddf7ee9a
commit
3da436ec09
@ -538,11 +538,10 @@ _bt_preprocess_array_keys(IndexScanDesc scan, int *new_numberOfKeys)
|
|||||||
* _bt_preprocess_array_keys_final() -- fix up array scan key references
|
* _bt_preprocess_array_keys_final() -- fix up array scan key references
|
||||||
*
|
*
|
||||||
* When _bt_preprocess_array_keys performed initial array preprocessing, it
|
* When _bt_preprocess_array_keys performed initial array preprocessing, it
|
||||||
* set each array's array->scan_key to the array's arrayKeys[] entry offset
|
* set each array's array->scan_key to its scankey's arrayKeyData[] offset.
|
||||||
* (that also work as references into the original scan->keyData[] array).
|
|
||||||
* This function handles translation of the scan key references from the
|
* This function handles translation of the scan key references from the
|
||||||
* BTArrayKeyInfo info array, from input scan key references (to the keys in
|
* BTArrayKeyInfo info array, from input scan key references (to the keys in
|
||||||
* scan->keyData[]), into output references (to the keys in so->keyData[]).
|
* arrayKeyData[]), into output references (to the keys in so->keyData[]).
|
||||||
* Caller's keyDataMap[] array tells us how to perform this remapping.
|
* Caller's keyDataMap[] array tells us how to perform this remapping.
|
||||||
*
|
*
|
||||||
* Also finalizes so->orderProcs[] for the scan. Arrays already have an ORDER
|
* Also finalizes so->orderProcs[] for the scan. Arrays already have an ORDER
|
||||||
@ -2974,8 +2973,8 @@ _bt_preprocess_keys(IndexScanDesc scan)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that we've built a temporary mapping from so->keyData[] (output
|
* Now that we've built a temporary mapping from so->keyData[] (output
|
||||||
* scan keys) to scan->keyData[] (input scan keys), fix array->scan_key
|
* scan keys) to arrayKeyData[] (our input scan keys), fix array->scan_key
|
||||||
* references. Also consolidate the so->orderProc[] array such that it
|
* references. Also consolidate the so->orderProcs[] array such that it
|
||||||
* can be subscripted using so->keyData[]-wise offsets.
|
* can be subscripted using so->keyData[]-wise offsets.
|
||||||
*/
|
*/
|
||||||
if (arrayKeyData)
|
if (arrayKeyData)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user