1010 *
1111 *
1212 * IDENTIFICATION
13- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.52 1997/09/26 15:09:11 thomas Exp $
13+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.53 1997/09/29 05:58:12 vadim Exp $
1414 *
1515 * HISTORY
1616 * AUTHORDATEMAJOR EVENT
@@ -107,7 +107,7 @@ static char *FlattenStringList(List *list);
107107AddAttrStmt, ClosePortalStmt,
108108CopyStmt, CreateStmt, CreateSeqStmt, DefineStmt, DestroyStmt,
109109ExtendStmt, FetchStmt,GrantStmt, CreateTrigStmt, DropTrigStmt,
110- IndexStmt,MoveStmt, ListenStmt, OptimizableStmt,
110+ IndexStmt, ListenStmt, OptimizableStmt,
111111ProcedureStmt, PurgeStmt,
112112RecipeStmt, RemoveAggrStmt, RemoveOperStmt, RemoveFuncStmt, RemoveStmt,
113113RenameStmt, RevokeStmt, RuleStmt, TransactionStmt, ViewStmt, LoadStmt,
@@ -162,7 +162,7 @@ static char *FlattenStringList(List *list);
162162%type <ival>copy_dirn, archive_type, OptArchiveType, OptArchiveLocation,
163163def_type, opt_direction, remove_type, opt_column, event
164164
165- %type <ival>OptLocation,opt_move_where, fetch_how_many
165+ %type <ival>OptLocation, fetch_how_many
166166
167167%type <list>OptSeqList
168168%type <defelt>OptSeqElem
@@ -299,7 +299,6 @@ stmt : AddAttrStmt
299299| FetchStmt
300300| GrantStmt
301301| IndexStmt
302- | MoveStmt
303302| ListenStmt
304303| ProcedureStmt
305304| PurgeStmt
@@ -995,7 +994,7 @@ DestroyStmt:DROP TABLE relation_name_list
995994/*****************************************************************************
996995 *
997996 *QUERY:
998- * fetch [forward | backward] [number | all ] [ in <portalname> ]
997+ *fetch/move [forward | backward] [number | all ] [ in <portalname> ]
999998 *
1000999 *****************************************************************************/
10011000
@@ -1005,6 +1004,16 @@ FetchStmt:FETCH opt_direction fetch_how_many opt_portal_name
10051004n->direction = $2;
10061005n->howMany = $3;
10071006n->portalname = $4;
1007+ n->ismove = false;
1008+ $$ = (Node *)n;
1009+ }
1010+ |MOVE opt_direction fetch_how_many opt_portal_name
1011+ {
1012+ FetchStmt *n = makeNode(FetchStmt);
1013+ n->direction = $2;
1014+ n->howMany = $3;
1015+ n->portalname = $4;
1016+ n->ismove = true;
10081017$$ = (Node *)n;
10091018}
10101019;
@@ -1021,6 +1030,10 @@ fetch_how_many: Iconst
10211030| /*EMPTY*/{ $$ = 1; /*default*/ }
10221031;
10231032
1033+ opt_portal_name: IN name{ $$ = $2;}
1034+ | /*EMPTY*/{ $$ = NULL; }
1035+ ;
1036+
10241037/*****************************************************************************
10251038 *
10261039 *QUERY:
@@ -1119,42 +1132,6 @@ RevokeStmt: REVOKE privileges ON relation_name_list FROM grantee
11191132}
11201133;
11211134
1122- /*****************************************************************************
1123- *
1124- *QUERY:
1125- *move [<dirn>] [<whereto>] [<portalname>]
1126- *
1127- *****************************************************************************/
1128-
1129- MoveStmt: MOVE opt_direction opt_move_where opt_portal_name
1130- {
1131- MoveStmt *n = makeNode(MoveStmt);
1132- n->direction = $2;
1133- n->to = FALSE;
1134- n->where = $3;
1135- n->portalname = $4;
1136- $$ = (Node *)n;
1137- }
1138- | MOVE opt_direction TO Iconst opt_portal_name
1139- {
1140- MoveStmt *n = makeNode(MoveStmt);
1141- n->direction = $2;
1142- n->to = TRUE;
1143- n->where = $4;
1144- n->portalname = $5;
1145- $$ = (Node *)n;
1146- }
1147- ;
1148-
1149- opt_move_where: Iconst{ $$ = $1; }
1150- | /*EMPTY*/{ $$ = 1; /* default */ }
1151- ;
1152-
1153- opt_portal_name: IN name{ $$ = $2;}
1154- | /*EMPTY*/{ $$ = NULL; }
1155- ;
1156-
1157-
11581135/*****************************************************************************
11591136 *
11601137 *QUERY: