summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorDavid Rowley2023-01-31 21:52:41 +0000
committerDavid Rowley2023-01-31 21:52:41 +0000
commite9aaf06328c7f962f8586618981e9763d31402a3 (patch)
tree06efbbe5703244dbae4dd6a57ffeb10ae89137d7 /src/include/nodes
parent856ca51a23b56df6aab3ee9bffc66334b79be355 (diff)
Remove dead NoMovementScanDirection code
Here remove some dead code from heapgettup() and heapgettup_pagemode() which was trying to support NoMovementScanDirection scans. This code can never be reached as standard_ExecutorRun() never calls ExecutePlan with NoMovementScanDirection. Additionally, plans which were scanning an unordered index would use NoMovementScanDirection rather than ForwardScanDirection. There was no real need for this, so here we adjust this so we use ForwardScanDirection for unordered index scans. A comment in pathnodes.h claimed that NoMovementScanDirection was used for PathKey reasons, but if that was true, it no longer is, per code in build_index_paths(). This does change the non-text format of the EXPLAIN output so that unordered index scans now have a "Forward" scan direction rather than "NoMovement". The text format of EXPLAIN has not changed. Author: Melanie Plageman Reviewed-by: Tom Lane, David Rowley Discussion: https://postgr.es/m/CAAKRu_bvkhka0CZQun28KTqhuUh5ZqY=_T8QEqZqOL02rpi2bw@mail.gmail.com
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/pathnodes.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
index 62d9460258c..0d4b1ec4e42 100644
--- a/src/include/nodes/pathnodes.h
+++ b/src/include/nodes/pathnodes.h
@@ -1672,12 +1672,9 @@ typedef struct Path
* on which index column each ORDER BY can be used with.)
*
* 'indexscandir' is one of:
- * ForwardScanDirection: forward scan of an ordered index
+ * ForwardScanDirection: forward scan of an index
* BackwardScanDirection: backward scan of an ordered index
- * NoMovementScanDirection: scan of an unordered index, or don't care
- * (The executor doesn't care whether it gets ForwardScanDirection or
- * NoMovementScanDirection for an indexscan, but the planner wants to
- * distinguish ordered from unordered indexes for building pathkeys.)
+ * Unordered indexes will always have an indexscandir of ForwardScanDirection.
*
* 'indextotalcost' and 'indexselectivity' are saved in the IndexPath so that
* we need not recompute them when considering using the same index in a