Remove unused nbtree array advancement variable.
authorPeter Geoghegan <[email protected]>
Sun, 12 Oct 2025 18:04:08 +0000 (14:04 -0400)
committerPeter Geoghegan <[email protected]>
Sun, 12 Oct 2025 18:04:08 +0000 (14:04 -0400)
Remove a variable that is no longer in use following commit 9a2e2a28.
It's not immediately clear why there were no compiler warnings about
this oversight.

Author: Peter Geoghegan <[email protected]>
Backpatch-through: 18

src/backend/access/nbtree/nbtutils.c

index 7c57f7075dbb7a39b4ec5465c933fb0bc4670ed6..288da8b68abd20ab10d87987ce6cb1963b9cca62 100644 (file)
@@ -1449,7 +1449,6 @@ _bt_advance_array_keys(IndexScanDesc scan, BTReadPageState *pstate,
        BTArrayKeyInfo *array = NULL;
        Datum       tupdatum;
        bool        required = false,
-                   required_opposite_direction_only = false,
                    tupnull;
        int32       result;
        int         set_elem = 0;
@@ -1473,8 +1472,7 @@ _bt_advance_array_keys(IndexScanDesc scan, BTReadPageState *pstate,
                  (cur->sk_flags & (SK_BT_REQBKWD))) ||
                 (ScanDirectionIsBackward(dir) &&
                  (cur->sk_flags & (SK_BT_REQFWD)))))
-               has_required_opposite_direction_only =
-                   required_opposite_direction_only = true;
+               has_required_opposite_direction_only = true;
        }
 
        /* Optimization: skip over known-satisfied scan keys */