From: Tom Lane Date: Mon, 20 Nov 2000 22:03:06 +0000 (+0000) Subject: Fix yacc failures in preproc.y. X-Git-Tag: REL7_1_BETA~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=712af72c779418101edc0bfc52099a06623f2ded;p=postgresql Fix yacc failures in preproc.y. --- diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 49a513ead3..14146a118b 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -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(")")); }