10
10
*
11
11
*
12
12
* 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 $
14
14
*
15
15
* HISTORY
16
16
* AUTHOR DATE MAJOR EVENT
@@ -107,7 +107,7 @@ static char *FlattenStringList(List *list);
107
107
AddAttrStmt, ClosePortalStmt,
108
108
CopyStmt, CreateStmt, CreateSeqStmt, DefineStmt, DestroyStmt,
109
109
ExtendStmt, FetchStmt, GrantStmt, CreateTrigStmt, DropTrigStmt,
110
- IndexStmt, MoveStmt, ListenStmt, OptimizableStmt,
110
+ IndexStmt, ListenStmt, OptimizableStmt,
111
111
ProcedureStmt, PurgeStmt,
112
112
RecipeStmt, RemoveAggrStmt, RemoveOperStmt, RemoveFuncStmt, RemoveStmt,
113
113
RenameStmt, RevokeStmt, RuleStmt, TransactionStmt, ViewStmt, LoadStmt,
@@ -162,7 +162,7 @@ static char *FlattenStringList(List *list);
162
162
%type <ival> copy_dirn, archive_type, OptArchiveType, OptArchiveLocation,
163
163
def_type, opt_direction, remove_type, opt_column, event
164
164
165
- %type <ival> OptLocation, opt_move_where, fetch_how_many
165
+ %type <ival> OptLocation, fetch_how_many
166
166
167
167
%type <list> OptSeqList
168
168
%type <defelt> OptSeqElem
@@ -299,7 +299,6 @@ stmt : AddAttrStmt
299
299
| FetchStmt
300
300
| GrantStmt
301
301
| IndexStmt
302
- | MoveStmt
303
302
| ListenStmt
304
303
| ProcedureStmt
305
304
| PurgeStmt
@@ -995,7 +994,7 @@ DestroyStmt: DROP TABLE relation_name_list
995
994
/*****************************************************************************
996
995
*
997
996
* QUERY:
998
- * fetch [forward | backward] [number | all ] [ in <portalname> ]
997
+ * fetch/move [forward | backward] [number | all ] [ in <portalname> ]
999
998
*
1000
999
*****************************************************************************/
1001
1000
@@ -1005,6 +1004,16 @@ FetchStmt: FETCH opt_direction fetch_how_many opt_portal_name
1005
1004
n->direction = $2;
1006
1005
n->howMany = $3;
1007
1006
n->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;
1008
1017
$$ = (Node *)n;
1009
1018
}
1010
1019
;
@@ -1021,6 +1030,10 @@ fetch_how_many: Iconst
1021
1030
| /*EMPTY*/ { $$ = 1; /*default*/ }
1022
1031
;
1023
1032
1033
+ opt_portal_name: IN name { $$ = $2;}
1034
+ | /*EMPTY*/ { $$ = NULL; }
1035
+ ;
1036
+
1024
1037
/*****************************************************************************
1025
1038
*
1026
1039
* QUERY:
@@ -1119,42 +1132,6 @@ RevokeStmt: REVOKE privileges ON relation_name_list FROM grantee
1119
1132
}
1120
1133
;
1121
1134
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
-
1158
1135
/*****************************************************************************
1159
1136
*
1160
1137
* QUERY:
0 commit comments