Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cd58370

Browse files
author
Michael Meskes
committed
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
1 parent c89404e commit cd58370

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/backend/parser/gram.y

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.636 2008/11/12 15:50:20 meskes Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.637 2008/11/13 11:10:06 meskes Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -330,7 +330,7 @@ static TypeName *TableFuncTypeName(List *columns);
330330
%type <ival> sub_type
331331
%type <list> OptCreateAs CreateAsList
332332
%type <node> CreateAsElement ctext_expr
333-
%type <value> NumericOnly FloatOnly IntegerOnly
333+
%type <value> NumericOnly
334334
%type <alias> alias_clause
335335
%type <sortby> sortby
336336
%type <ielem> index_elem
@@ -1525,13 +1525,13 @@ alter_table_cmd:
15251525
n->name = $3;
15261526
$$ = (Node *)n;
15271527
}
1528-
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <IntegerOnly> */
1529-
| ALTER opt_column ColId SET STATISTICS IntegerOnly
1528+
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <SignedIconst> */
1529+
| ALTER opt_column ColId SET STATISTICS SignedIconst
15301530
{
15311531
AlterTableCmd *n = makeNode(AlterTableCmd);
15321532
n->subtype = AT_SetStatistics;
15331533
n->name = $3;
1534-
n->def = (Node *) $6;
1534+
n->def = (Node *) makeInteger($6);
15351535
$$ = (Node *)n;
15361536
}
15371537
/* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */
@@ -2577,21 +2577,15 @@ opt_by: BY {}
25772577
;
25782578

25792579
NumericOnly:
2580-
FloatOnly { $$ = $1; }
2581-
| IntegerOnly { $$ = $1; }
2582-
;
2583-
2584-
FloatOnly: FCONST { $$ = makeFloat($1); }
2580+
FCONST { $$ = makeFloat($1); }
25852581
| '-' FCONST
25862582
{
25872583
$$ = makeFloat($2);
25882584
doNegateFloat($$);
25892585
}
2586+
| SignedIconst { $$ = makeInteger($1); };
25902587
;
25912588

2592-
IntegerOnly: SignedIconst { $$ = makeInteger($1); };
2593-
2594-
25952589
/*****************************************************************************
25962590
*
25972591
* QUERIES :

0 commit comments

Comments
 (0)