Skip to content

Commit 918e4d5

Browse files
petergeogheganCommitfest Bot
authored andcommitted
nbtree: Use only one notnullkey ScanKeyData
1 parent 84ce258 commit 918e4d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/access/nbtree/nbtsearch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
892892
OffsetNumber offnum;
893893
BTScanInsertData inskey;
894894
ScanKey startKeys[INDEX_MAX_KEYS];
895-
ScanKeyData notnullkeys[INDEX_MAX_KEYS];
895+
ScanKeyData notnullkey;
896896
int keysz = 0;
897897
StrategyNumber strat_total;
898898
BlockNumber blkno = InvalidBlockNumber,
@@ -1122,8 +1122,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
11221122
ScanDirectionIsForward(dir) :
11231123
ScanDirectionIsBackward(dir)))
11241124
{
1125-
/* Yes, so build the key in notnullkeys[keysz] */
1126-
bkey = &notnullkeys[keysz];
1125+
/* Final startKeys[] entry will be deduced NOT NULL key */
1126+
bkey = &notnullkey;
11271127
ScanKeyEntryInitialize(bkey,
11281128
(SK_SEARCHNOTNULL | SK_ISNULL |
11291129
(impliesNN->sk_flags &

0 commit comments

Comments
 (0)