|
11 | 11 | *
|
12 | 12 | *
|
13 | 13 | * 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 $ |
15 | 15 | *
|
16 | 16 | * HISTORY
|
17 | 17 | * AUTHOR DATE MAJOR EVENT
|
@@ -330,7 +330,7 @@ static TypeName *TableFuncTypeName(List *columns);
|
330 | 330 | %type <ival> sub_type
|
331 | 331 | %type <list> OptCreateAs CreateAsList
|
332 | 332 | %type <node> CreateAsElement ctext_expr
|
333 |
| -%type <value> NumericOnly FloatOnly IntegerOnly |
| 333 | +%type <value> NumericOnly |
334 | 334 | %type <alias> alias_clause
|
335 | 335 | %type <sortby> sortby
|
336 | 336 | %type <ielem> index_elem
|
@@ -1525,13 +1525,13 @@ alter_table_cmd:
|
1525 | 1525 | n->name = $3;
|
1526 | 1526 | $$ = (Node *)n;
|
1527 | 1527 | }
|
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 |
1530 | 1530 | {
|
1531 | 1531 | AlterTableCmd *n = makeNode(AlterTableCmd);
|
1532 | 1532 | n->subtype = AT_SetStatistics;
|
1533 | 1533 | n->name = $3;
|
1534 |
| - n->def = (Node *) $6; |
| 1534 | + n->def = (Node *) makeInteger($6); |
1535 | 1535 | $$ = (Node *)n;
|
1536 | 1536 | }
|
1537 | 1537 | /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */
|
@@ -2577,21 +2577,15 @@ opt_by: BY {}
|
2577 | 2577 | ;
|
2578 | 2578 |
|
2579 | 2579 | NumericOnly:
|
2580 |
| - FloatOnly { $$ = $1; } |
2581 |
| - | IntegerOnly { $$ = $1; } |
2582 |
| - ; |
2583 |
| - |
2584 |
| -FloatOnly: FCONST { $$ = makeFloat($1); } |
| 2580 | + FCONST { $$ = makeFloat($1); } |
2585 | 2581 | | '-' FCONST
|
2586 | 2582 | {
|
2587 | 2583 | $$ = makeFloat($2);
|
2588 | 2584 | doNegateFloat($$);
|
2589 | 2585 | }
|
| 2586 | + | SignedIconst { $$ = makeInteger($1); }; |
2590 | 2587 | ;
|
2591 | 2588 |
|
2592 |
| -IntegerOnly: SignedIconst { $$ = makeInteger($1); }; |
2593 |
| - |
2594 |
| - |
2595 | 2589 | /*****************************************************************************
|
2596 | 2590 | *
|
2597 | 2591 | * QUERIES :
|
|
0 commit comments