NoMovementScanDirection - Mailing list pgsql-hackers

From Neil Conway
Subject NoMovementScanDirection
Date
Msg-id 1099876522.22609.42.camel@localhost.localdomain
Whole thread Raw
Responses Re: NoMovementScanDirection
List pgsql-hackers
In the context of an index scan, what does NoMovementScanDirection
indicate? On the one hand, relation.h comments:
* 'indexscandir' is one of:*    ForwardScanDirection: forward scan of an ordered index*    BackwardScanDirection:
backwardscan of an ordered index*    NoMovementScanDirection: scan of an unordered index, or don't care* (The executor
doesn'tcare whether it gets ForwardScanDirection or* NoMovementScanDirection for an indexscan, but the planner wants
to*distinguish ordered from unordered indexes for building pathkeys.)
 

But ExecutorRun() does not invoke ExecutePlan() if the scan direction is
NoMovementScanDirection (and IndexNext() derives its scan direction from
the scan direction that ExecutePlan() sets in the EState). Are there any
situations in which, as the relation.h comment seems to suggest, an
index scan will be invoked with NoMovementScanDirection?

(I ask because gistscancache() is a no-op unless the index scan is
invoked with the NoMovementScanDirection, so it seems of dubious
value...)

-Neil




pgsql-hackers by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: UPDATE is not allowed in a non-volatile function
Next
From: Tom Lane
Date:
Subject: Re: Error: set log_error_verbosity to verbose fails