aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 2eff34c4aa6..498b8d20358 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -3394,6 +3394,13 @@ _bt_fix_scankey_strategy(ScanKey skey, int16 *indoption)
return true;
}
+ if (skey->sk_strategy == InvalidStrategy)
+ {
+ /* Already-eliminated array scan key; don't need to fix anything */
+ Assert(skey->sk_flags & SK_SEARCHARRAY);
+ return true;
+ }
+
/* Adjust strategy for DESC, if we didn't already */
if ((addflags & SK_BT_DESC) && !(skey->sk_flags & SK_BT_DESC))
skey->sk_strategy = BTCommuteStrategyNumber(skey->sk_strategy);