Neil Conway <neilc(at)samurai(dot)com> writes:
> In the context of an index scan, what does NoMovementScanDirection
> indicate?
ScanDirection is used in different ways in different places. The
planner uses NoMovementScanDirection to denote an unordered index scan,
and this propagates into the indxorderdir field of IndexScan plan nodes,
However execMain.c uses NoMovementScanDirection to denote "do nothing",
and so es_direction will never have this value at runtime. I think
pquery.c's use is aligned with the executor but it would take some
closer looking to be completely sure.
Not sure if it's worth factoring the enum type into two (or more?)
types to distinguish these shades of meaning.
regards, tom lane