Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3da436e

Browse files
Update obsolete nbtree array preprocessing comments.
The array->scan_key references fixed up at the end of preprocessingstart out as offsets into the arrayKeyData[] array (the array returnedby _bt_preprocess_array_keys at the start of preprocessing that involvesarray scan keys). Offsets into the arrayKeyData[] array are no longerguaranteed to be valid offsets into our original scan->keyData[] inputscan key array, but comments describing the array->scan_key referencesstill talked about scan->keyData[]. Update those comments.Oversight in commitb524974.
1 parent62ddf7e commit3da436e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/backend/access/nbtree/nbtutils.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,10 @@ _bt_preprocess_array_keys(IndexScanDesc scan, int *new_numberOfKeys)
538538
*_bt_preprocess_array_keys_final() -- fix up array scan key references
539539
*
540540
* When _bt_preprocess_array_keys performed initial array preprocessing, it
541-
* set each array's array->scan_key to the array's arrayKeys[] entry offset
542-
* (that also work as references into the original scan->keyData[] array).
541+
* set each array's array->scan_key to its scankey's arrayKeyData[] offset.
543542
* This function handles translation of the scan key references from the
544543
* BTArrayKeyInfo info array, from input scan key references (to the keys in
545-
*scan->keyData[]), into output references (to the keys in so->keyData[]).
544+
*arrayKeyData[]), into output references (to the keys in so->keyData[]).
546545
* Caller's keyDataMap[] array tells us how to perform this remapping.
547546
*
548547
* Also finalizes so->orderProcs[] for the scan. Arrays already have an ORDER
@@ -2974,8 +2973,8 @@ _bt_preprocess_keys(IndexScanDesc scan)
29742973

29752974
/*
29762975
* Now that we've built a temporary mapping from so->keyData[] (output
2977-
* scan keys) toscan->keyData[] (input scan keys), fix array->scan_key
2978-
* references. Also consolidate the so->orderProc[] array such that it
2976+
* scan keys) toarrayKeyData[] (ourinput scan keys), fix array->scan_key
2977+
* references. Also consolidate the so->orderProcs[] array such that it
29792978
* can be subscripted using so->keyData[]-wise offsets.
29802979
*/
29812980
if (arrayKeyData)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp