summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-03-11 19:40:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-03-11 19:40:24 +0000
commit6261c75014c9948837d9d025493ef18b8f833f70 (patch)
treef7d75ca8cfa6a093d0fde2f707ae48e90ced7771 /src/include/nodes/parsenodes.h
parente4704001ea4c3d63b53e8783859ff598ef2f69e5 (diff)
downloadpostgresql-6261c75014c9948837d9d025493ef18b8f833f70.tar.gz
Implement SQL92-compatible FIRST, LAST, ABSOLUTE n, RELATIVE n options
for FETCH and MOVE.
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c84348ded9..216ed04c76 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.232 2003/03/10 03:53:51 tgl Exp $
+ * $Id: parsenodes.h,v 1.233 2003/03/11 19:40:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1228,16 +1228,21 @@ typedef struct ClosePortalStmt
*/
typedef enum FetchDirection
{
+ /* for these, howMany is how many rows to fetch; FETCH_ALL means ALL */
FETCH_FORWARD,
- FETCH_BACKWARD
- /* ABSOLUTE someday? */
+ FETCH_BACKWARD,
+ /* for these, howMany indicates a position; only one row is fetched */
+ FETCH_ABSOLUTE,
+ FETCH_RELATIVE
} FetchDirection;
+#define FETCH_ALL LONG_MAX
+
typedef struct FetchStmt
{
NodeTag type;
FetchDirection direction; /* see above */
- long howMany; /* number of rows */
+ long howMany; /* number of rows, or position argument */
char *portalname; /* name of portal (cursor) */
bool ismove; /* TRUE if MOVE */
} FetchStmt;