pgsql: Remove obsolete nbtree equality key comments. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Remove obsolete nbtree equality key comments.
Date
Msg-id E1vFcug-004ikd-2N@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Remove obsolete nbtree equality key comments.

_bt_first reliably uses the same equality key (on each index column) for
initial positioning purposes as the one that _bt_checkkeys can use to
end the scan following commit f09816a0.  _bt_first no longer applies its
own independent rules to determine which initial positioning key to use
on each column (for equality and inequality keys alike).  Preprocessing
is now fully in control of determining which keys start and end each
scan, ensuring that _bt_first and _bt_checkkeys have symmetric behavior.

Remove obsolete comments that described why _bt_first was expected to
use at least one of the available required equality keys for initial
positioning purposes.  The rules in this area are now maximally strict
and uniform, so there's no reason to draw attention to equality keys.
Any column with a required equality key cannot have a redundant required
inequality key (nor can it have a redundant required equality key).

Oversight in commit f09816a0, which removed similar comments from
_bt_first, but missed these comments.

Author: Peter Geoghegan <pg@bowt.ie>
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f08586c7ae5df69f768b3c4cf87f2e1a543a975

Modified Files
--------------
src/backend/access/nbtree/nbtsearch.c | 9 +++------
src/backend/access/nbtree/nbtutils.c  | 5 -----
2 files changed, 3 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Avoid mixing void and integer in a conditional expression.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Document nbtree row comparison design.