NoMovementScanDirection

From: Neil Conway <neilc(at)samurai(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: NoMovementScanDirection
Date: 2004-11-08 01:15:22
Message-ID: 1099876522.22609.42.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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: 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.)

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-08 01:47:30 Re: Contribute to the development of PostgreSQL
Previous Message Tom Lane 2004-11-08 01:06:11 Re: Error: set log_error_verbosity to verbose fails