Content-Length: 272154 | pFad | http://github.com/postgrespro/postgres/commit/70743376987af2393e42f3cfc2def4a472070659

D7 Refine nbtree = redundancy preprocessing comment. · postgrespro/postgres@7074337 · GitHub
Skip to content

Commit 7074337

Browse files
Refine nbtree = redundancy preprocessing comment.
Spell out how a = key associated with a SAOP array renders a > key against the same index column redundant at the relevant point inside _bt_preprocess_keys. Follow-up to commit 5bf748b.
1 parent 94131cd commit 7074337

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/backend/access/nbtree/nbtutils.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,8 +2668,14 @@ _bt_preprocess_keys(IndexScanDesc scan)
26682668

26692669
/*
26702670
* If = has been specified, all other keys can be eliminated as
2671-
* redundant. If we have a case like key = 1 AND key > 2, we can
2672-
* set qual_ok to false and abandon further processing.
2671+
* redundant. Note that this is no less true if the = key is
2672+
* SEARCHARRAY; the only real difference is that the inequality
2673+
* key _becomes_ redundant by making _bt_compare_scankey_args
2674+
* eliminate the subset of elements that won't need to be matched.
2675+
*
2676+
* If we have a case like "key = 1 AND key > 2", we set qual_ok to
2677+
* false and abandon further processing. We'll do the same thing
2678+
* given a case like "key IN (0, 1) AND key > 2".
26732679
*
26742680
* We also have to deal with the case of "key IS NULL", which is
26752681
* unsatisfiable in combination with any other index condition. By

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/70743376987af2393e42f3cfc2def4a472070659

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy