]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove unused nbtree array advancement variable.
authorPeter Geoghegan <pg@bowt.ie>
Sun, 12 Oct 2025 18:04:06 +0000 (14:04 -0400)
committerPeter Geoghegan <pg@bowt.ie>
Sun, 12 Oct 2025 18:04:06 +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 <pg@bowt.ie>
Backpatch-through: 18

src/backend/access/nbtree/nbtutils.c

index 80887df14928cab210f333bec16edb40db676921..f1db8d429cf1f8ef0fd8b36979af9b7cf3f2d0b6 100644 (file)
@@ -1445,7 +1445,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;
@@ -1469,8 +1468,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 */