Scan Direction not part of ScanState?

Started by Martijn van Oosterhoutover 20 years ago2 messages
#1Martijn van Oosterhout
kleptog@svana.org

Hi,

I notice that the IndexScan code looks up the scan direction each
invocation by looking up the direction of the plan. Does this mean the
direction can change in the middle of a scan? Is this how MOVE
FORWARD/BACKWARD works?

I've traced the code and it *appears* this is what's happening, but can
anyone clarify?

Thanks in advance,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Martijn van Oosterhout (#1)
Re: Scan Direction not part of ScanState?

Martijn van Oosterhout <kleptog@svana.org> writes:

I notice that the IndexScan code looks up the scan direction each
invocation by looking up the direction of the plan. Does this mean the
direction can change in the middle of a scan? Is this how MOVE
FORWARD/BACKWARD works?

Yes, yes.

regards, tom lane