1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Cleanup the usage of ScanDirection: use the symbolic names for the

possible ScanDirection alternatives rather than magic numbers
(-1, 0, 1).  Also, use the ScanDirection macros in a few places
rather than directly checking whether `dir == ForwardScanDirection'
and the like. Per patch from James William Pye. His patch also
changed ScanDirection to be a "char" rather than an enum, which
I haven't applied.
This commit is contained in:
Neil Conway
2006-02-21 23:01:54 +00:00
parent 3666260ffd
commit 737651f6be
3 changed files with 30 additions and 48 deletions

View File

@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.266 2006/02/19 00:04:26 neilc Exp $
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.267 2006/02/21 23:01:54 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@ -218,7 +218,7 @@ ExecutorRun(QueryDesc *queryDesc,
/*
* run plan
*/
if (direction == NoMovementScanDirection)
if (ScanDirectionIsNoMovement(direction))
result = NULL;
else
result = ExecutePlan(estate,