Fix yacc failures in preproc.y.
authorTom Lane
Mon, 20 Nov 2000 22:03:06 +0000 (22:03 +0000)
committerTom Lane
Mon, 20 Nov 2000 22:03:06 +0000 (22:03 +0000)
src/interfaces/ecpg/preproc/preproc.y

index 49a513ead38a90fbcc440adc42dbb336cf08c991..14146a118b6635a0eee8d52def7cdddd7225a900 100644 (file)
@@ -329,8 +329,8 @@ make_name(void)
 %type     DropTrigStmt TriggerOneEvent TriggerEvents RuleActionStmt
 %type      TriggerActionTime CreateTrigStmt DropPLangStmt PLangTrusted
 %type      CreatePLangStmt TriggerFuncArgs TriggerFuncArg simple_select
-%type      ViewStmt LoadStmt CreatedbStmt createdb_opt_encoding
-%type     createdb_opt_location opt_encoding OptInherit Geometric
+%type      ViewStmt LoadStmt CreatedbStmt createdb_opt_item
+%type     createdb_opt_list opt_encoding OptInherit Geometric
 %type      DropdbStmt ClusterStmt grantee RevokeStmt Bit bit
 %type     GrantStmt privileges operation_commalist operation PosAllConst
 %type     opt_cursor opt_lmode ConstraintsSetStmt comment_tg AllConst
@@ -2253,7 +2253,7 @@ LoadStmt:  LOAD file_name
 
 CreatedbStmt:  CREATE DATABASE database_name WITH createdb_opt_list
            {
-               $$ = cat_str(5, make_str("create database"), $3, make_str("with"), $5, $6);
+               $$ = cat_str(4, make_str("create database"), $3, make_str("with"), $5);
            }
        | CREATE DATABASE database_name
                    {
@@ -2390,7 +2390,7 @@ OptimizableStmt:  SelectStmt
 
 /* This rule used 'opt_column_list' between 'relation_name' and 'insert_rest'
  * originally. When the second rule of 'insert_rest' was changed to use
- * the new 'SelectStmt' rule (for INTERSECT and EXCEPT) it produced a shift/red uce
+ * the new 'SelectStmt' rule (for INTERSECT and EXCEPT) it produced a shift/reduce
  * conflict. So I just changed the rules 'InsertStmt' and 'insert_rest' to accept
  * the same statements without any shift/reduce conflicts */
 InsertStmt:  INSERT INTO relation_name insert_rest
@@ -3550,7 +3550,7 @@ c_expr:  attr
                {   $$ = cat_str(3, make_str("trim(trailing"), $4, make_str(")")); }
        | TRIM '(' trim_list ')'
                {   $$ = cat_str(3, make_str("trim("), $3, make_str(")")); }
-       | '(' SelectStmt ')'
+       | '(' select_no_parens ')'
                {   $$ = cat_str(3, make_str("("), $2, make_str(")")); }
        | EXISTS '(' SelectStmt ')'
                {   $$ = cat_str(3, make_str("exists("), $3, make_str(")")); }