]> granicus.if.org Git - postgresql/commitdiff
Removed two non-terminals:
authorMichael Meskes <meskes@postgresql.org>
Thu, 13 Nov 2008 11:10:06 +0000 (11:10 +0000)
committerMichael Meskes <meskes@postgresql.org>
Thu, 13 Nov 2008 11:10:06 +0000 (11:10 +0000)
- 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

src/backend/parser/gram.y

index 20c514725b03b3dff7fc0c1a69ccdbc4c43eac5f..b3046c04b201b66c8e1786f810982b5737eaf91c 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * 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
  *       AUTHOR                        DATE                    MAJOR EVENT
@@ -330,7 +330,7 @@ static TypeName *TableFuncTypeName(List *columns);
 %type <ival>   sub_type
 %type <list>   OptCreateAs CreateAsList
 %type <node>   CreateAsElement ctext_expr
-%type <value>  NumericOnly FloatOnly IntegerOnly
+%type <value>  NumericOnly
 %type <alias>  alias_clause
 %type <sortby> sortby
 %type <ielem>  index_elem
@@ -1525,13 +1525,13 @@ alter_table_cmd:
                                        n->name = $3;
                                        $$ = (Node *)n;
                                }
-                       /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <IntegerOnly> */
-                       | ALTER opt_column ColId SET STATISTICS IntegerOnly
+                       /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STATISTICS <SignedIconst> */
+                       | ALTER opt_column ColId SET STATISTICS SignedIconst
                                {
                                        AlterTableCmd *n = makeNode(AlterTableCmd);
                                        n->subtype = AT_SetStatistics;
                                        n->name = $3;
-                                       n->def = (Node *) $6;
+                                       n->def = (Node *) makeInteger($6);
                                        $$ = (Node *)n;
                                }
                        /* ALTER TABLE <name> ALTER [COLUMN] <colname> SET STORAGE <storagemode> */
@@ -2577,21 +2577,15 @@ opt_by:         BY                              {}
          ;
 
 NumericOnly:
-                       FloatOnly                                                               { $$ = $1; }
-                       | IntegerOnly                                                   { $$ = $1; }
-               ;
-
-FloatOnly:     FCONST                                                                  { $$ = makeFloat($1); }
+               FCONST                                                                  { $$ = makeFloat($1); }
                        | '-' FCONST
                                {
                                        $$ = makeFloat($2);
                                        doNegateFloat($$);
                                }
+                       | SignedIconst                                                  { $$ = makeInteger($1); };
                ;
 
-IntegerOnly: SignedIconst                                                      { $$ = makeInteger($1); };
-
-
 /*****************************************************************************
  *
  *             QUERIES :