Update obsolete row compare preprocessing comments. · postgres/postgres@9ca30a0 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 9ca30a0

Browse files
Update obsolete row compare preprocessing comments.
Restore nbtree preprocessing comments describing how we mark nbtree row compare members required to how they were prior to 2016 bugfix commit a298a1e. Oversight in commit bd3f59f, which made nbtree preprocessing revert to the original 2006 rules, but neglected to revert these comments. Backpatch-through: 18
1 parent 7374b3a commit 9ca30a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/backend/access/nbtree/nbtpreprocesskeys.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,12 @@ _bt_fix_scankey_strategy(ScanKey skey, int16 *indoption)
752752
*
753753
* Depending on the operator type, the key may be required for both scan
754754
* directions or just one. Also, if the key is a row comparison header,
755-
* we have to mark its first subsidiary ScanKey as required. (Subsequent
756-
* subsidiary ScanKeys are normally for lower-order columns, and thus
757-
* cannot be required, since they're after the first non-equality scankey.)
755+
* we have to mark the appropriate subsidiary ScanKeys as required. In such
756+
* cases, the first subsidiary key is required, but subsequent ones are
757+
* required only as long as they correspond to successive index columns and
758+
* match the leading column as to sort direction. Otherwise the row
759+
* comparison ordering is different from the index ordering and so we can't
760+
* stop the scan on the basis of those lower-order columns.
758761
*
759762
* Note: when we set required-key flag bits in a subsidiary scankey, we are
760763
* scribbling on a data structure belonging to the index AM's caller, not on

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.