1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-25 13:17:41 +03:00
Files
postgres/src/include/access/sdir.h
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00

59 lines
1.5 KiB
C

/*-------------------------------------------------------------------------
*
* sdir.h
* POSTGRES scan direction definitions.
*
*
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/access/sdir.h,v 1.17 2004/12/31 22:03:21 pgsql Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef SDIR_H
#define SDIR_H
/*
* ScanDirection was an int8 for no apparent reason. I kept the original
* values because I'm not sure if I'll break anything otherwise. -ay 2/95
*/
typedef enum ScanDirection
{
BackwardScanDirection = -1,
NoMovementScanDirection = 0,
ForwardScanDirection = 1
} ScanDirection;
/*
* ScanDirectionIsValid
* True iff scan direction is valid.
*/
#define ScanDirectionIsValid(direction) \
((bool) (BackwardScanDirection <= (direction) && \
(direction) <= ForwardScanDirection))
/*
* ScanDirectionIsBackward
* True iff scan direction is backward.
*/
#define ScanDirectionIsBackward(direction) \
((bool) ((direction) == BackwardScanDirection))
/*
* ScanDirectionIsNoMovement
* True iff scan direction indicates no movement.
*/
#define ScanDirectionIsNoMovement(direction) \
((bool) ((direction) == NoMovementScanDirection))
/*
* ScanDirectionIsForward
* True iff scan direction is forward.
*/
#define ScanDirectionIsForward(direction) \
((bool) ((direction) == ForwardScanDirection))
#endif /* SDIR_H */