aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-09-03 03:19:45 +0000
committerBruce Momjian <bruce@momjian.us>2006-09-03 03:19:45 +0000
commit0e20c485617c3bcde8d9f0759d5ee1ef1c442004 (patch)
tree32d5363c51684442eb74103f47baccb1c3f175c0 /src/backend/parser
parentd387a0705058af6d07390dec5cb56a4720a302a6 (diff)
downloadpostgresql-0e20c485617c3bcde8d9f0759d5ee1ef1c442004.tar.gz
postgresql-0e20c485617c3bcde8d9f0759d5ee1ef1c442004.zip
Revert FETCH/MOVE int64 patch. Was using incorrect checks for
fetch/move in scan.l.
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y43
-rw-r--r--src/backend/parser/scan.l18
2 files changed, 2 insertions, 59 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 0377ba6f49f..2ff24296e90 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.563 2006/09/03 00:46:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.564 2006/09/03 03:19:44 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -116,7 +116,6 @@ static void doNegateFloat(Value *v);
%union
{
int ival;
- int64 i64val;
char chr;
char *str;
const char *keyword;
@@ -325,7 +324,6 @@ static void doNegateFloat(Value *v);
%type <boolean> opt_varying opt_timezone
%type <ival> Iconst SignedIconst
-%type <i64val> SignedI64const
%type <str> Sconst comment_text
%type <str> RoleId opt_granted_by opt_boolean ColId_or_Sconst
%type <list> var_list var_list_or_default
@@ -450,7 +448,6 @@ static void doNegateFloat(Value *v);
/* Special token types, not actually keywords - see the "lex" file */
%token <str> IDENT FCONST SCONST BCONST XCONST Op
%token <ival> ICONST PARAM
-%token <i64val> I64CONST
/* precedence: lowest to highest */
%nonassoc SET /* see relation_expr_opt_alias */
@@ -3359,27 +3356,6 @@ fetch_direction:
n->howMany = $1;
$$ = (Node *)n;
}
- | ABSOLUTE_P SignedI64const
- {
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = FETCH_ABSOLUTE;
- n->howMany = $2;
- $$ = (Node *)n;
- }
- | RELATIVE_P SignedI64const
- {
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = FETCH_RELATIVE;
- n->howMany = $2;
- $$ = (Node *)n;
- }
- | SignedI64const
- {
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = FETCH_FORWARD;
- n->howMany = $1;
- $$ = (Node *)n;
- }
| ALL
{
FetchStmt *n = makeNode(FetchStmt);
@@ -3401,13 +3377,6 @@ fetch_direction:
n->howMany = $2;
$$ = (Node *)n;
}
- | FORWARD SignedI64const
- {
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = FETCH_FORWARD;
- n->howMany = $2;
- $$ = (Node *)n;
- }
| FORWARD ALL
{
FetchStmt *n = makeNode(FetchStmt);
@@ -3429,13 +3398,6 @@ fetch_direction:
n->howMany = $2;
$$ = (Node *)n;
}
- | BACKWARD SignedI64const
- {
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = FETCH_BACKWARD;
- n->howMany = $2;
- $$ = (Node *)n;
- }
| BACKWARD ALL
{
FetchStmt *n = makeNode(FetchStmt);
@@ -8540,9 +8502,6 @@ RoleId: ColId { $$ = $1; };
SignedIconst: ICONST { $$ = $1; }
| '-' ICONST { $$ = - $2; }
;
-SignedI64const: I64CONST { $$ = $1; }
- | '-' I64CONST { $$ = - $2; }
- ;
/*
* Name classification hierarchy.
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 2a8ac8de868..c97c9e6ada3 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -24,7 +24,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.136 2006/09/02 18:17:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.137 2006/09/03 03:19:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -666,22 +666,6 @@ other .
#endif
)
{
- /* For Fetch/Move stmt, convert the string into int64 value */
- if((strcmp(yylval.keyword, "fetch")==0) || (strcmp(yylval.keyword, "move")==0))
- {
- int64 int64Val;
- errno = 0;
-
- int64Val = strtoll(yytext, &endptr, 10);
- if (*endptr != '\0' || errno == ERANGE)
- {
- yylval.str = pstrdup(yytext);
- return FCONST;
- }
- yylval.i64val = int64Val;
- return I64CONST;
- }
-
/* integer too large, treat it as a float */
yylval.str = pstrdup(yytext);
return FCONST;