Commit cd583703 authored by Michael Meskes's avatar Michael Meskes

Removed two non-terminals:

- FloatOnly: only used by NumericOnly, instead put the FloatOnly production into NumericOnly
- IntegerOnly: only used by NumericOnly and one ALTER TABLE rule, replacement SignedIconst is already used in several other places
parent c89404ed
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.636 2008/11/12 15:50:20 meskes Exp $ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.637 2008/11/13 11:10:06 meskes Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -330,7 +330,7 @@ static TypeName *TableFuncTypeName(List *columns); ...@@ -330,7 +330,7 @@ static TypeName *TableFuncTypeName(List *columns);
%type <ival> sub_type %type <ival> sub_type
%type <list> OptCreateAs CreateAsList %type <list> OptCreateAs CreateAsList
%type <node> CreateAsElement ctext_expr %type <node> CreateAsElement ctext_expr
%type <value> NumericOnly FloatOnly IntegerOnly %type <value> NumericOnly
%type <alias> alias_clause %type <alias> alias_clause
%type <sortby> sortby %type <sortby> sortby
%type <ielem> index_elem %type <ielem> index_elem
...@@ -1525,13 +1525,13 @@ alter_table_cmd: ...@@ -1525,13 +1525,13 @@ alter_table_cmd:
n->name = $3; n->name = $3;
$$ = (Node *)n; $$ = (Node *)n;
} }
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <IntegerOnly> */ /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <SignedIconst> */
| ALTER opt_column ColId SET STATISTICS IntegerOnly | ALTER opt_column ColId SET STATISTICS SignedIconst
{ {
AlterTableCmd *n = makeNode(AlterTableCmd); AlterTableCmd *n = makeNode(AlterTableCmd);
n->subtype = AT_SetStatistics; n->subtype = AT_SetStatistics;
n->name = $3; n->name = $3;
n->def = (Node *) $6; n->def = (Node *) makeInteger($6);
$$ = (Node *)n; $$ = (Node *)n;
} }
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */ /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */
...@@ -2577,21 +2577,15 @@ opt_by: BY {} ...@@ -2577,21 +2577,15 @@ opt_by: BY {}
; ;
NumericOnly: NumericOnly:
FloatOnly { $$ = $1; } FCONST { $$ = makeFloat($1); }
| IntegerOnly { $$ = $1; }
;
FloatOnly: FCONST { $$ = makeFloat($1); }
| '-' FCONST | '-' FCONST
{ {
$$ = makeFloat($2); $$ = makeFloat($2);
doNegateFloat($$); doNegateFloat($$);
} }
| SignedIconst { $$ = makeInteger($1); };
; ;
IntegerOnly: SignedIconst { $$ = makeInteger($1); };
/***************************************************************************** /*****************************************************************************
* *
* QUERIES : * QUERIES :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment