mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Simplify optional WITH handling in CREATE USER, ALTER USER, CREATE
GROUP. Make WITH optional in CREATE DATABASE for consistency.
This commit is contained in:
parent
0daee96ed1
commit
f91ee129a7
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.27 2002/04/21 19:02:39 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.28 2002/06/17 05:40:32 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ PostgreSQL documentation
|
|||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
|
CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
|
||||||
[ WITH [ OWNER [=] <replaceable class="parameter">dbowner</replaceable> ]
|
[ [ WITH ] [ OWNER [=] <replaceable class="parameter">dbowner</replaceable> ]
|
||||||
[ LOCATION [=] '<replaceable class="parameter">dbpath</replaceable>' ]
|
[ LOCATION [=] '<replaceable class="parameter">dbpath</replaceable>' ]
|
||||||
[ TEMPLATE [=] <replaceable class="parameter">template</replaceable> ]
|
[ TEMPLATE [=] <replaceable class="parameter">template</replaceable> ]
|
||||||
[ ENCODING [=] <replaceable class="parameter">encoding</replaceable> ] ]
|
[ ENCODING [=] <replaceable class="parameter">encoding</replaceable> ] ]
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.323 2002/06/15 03:00:03 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.324 2002/06/17 05:40:32 momjian Exp $
|
||||||
*
|
*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* AUTHOR DATE MAJOR EVENT
|
* AUTHOR DATE MAJOR EVENT
|
||||||
@ -201,7 +201,7 @@ static void doNegateFloat(Value *v);
|
|||||||
|
|
||||||
%type <list> stmtblock, stmtmulti,
|
%type <list> stmtblock, stmtmulti,
|
||||||
OptTableElementList, OptInherit, definition, opt_distinct,
|
OptTableElementList, OptInherit, definition, opt_distinct,
|
||||||
opt_with, func_args, func_args_list, func_as, createfunc_opt_list
|
opt_definition, func_args, func_args_list, func_as, createfunc_opt_list
|
||||||
oper_argtypes, RuleActionList, RuleActionMulti,
|
oper_argtypes, RuleActionList, RuleActionMulti,
|
||||||
opt_column_list, columnList, opt_name_list,
|
opt_column_list, columnList, opt_name_list,
|
||||||
sort_clause, sortby_list, index_params, index_list, name_list,
|
sort_clause, sortby_list, index_params, index_list, name_list,
|
||||||
@ -232,7 +232,7 @@ static void doNegateFloat(Value *v);
|
|||||||
%type <ival> opt_interval
|
%type <ival> opt_interval
|
||||||
%type <node> overlay_placing, substr_from, substr_for
|
%type <node> overlay_placing, substr_from, substr_for
|
||||||
|
|
||||||
%type <boolean> opt_binary, opt_using, opt_instead, opt_cursor
|
%type <boolean> opt_binary, opt_using, opt_instead, opt_cursor, opt_with
|
||||||
%type <boolean> opt_with_copy, index_opt_unique, opt_verbose, opt_full
|
%type <boolean> opt_with_copy, index_opt_unique, opt_verbose, opt_full
|
||||||
%type <boolean> opt_freeze, analyze_keyword
|
%type <boolean> opt_freeze, analyze_keyword
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ stmt : AlterDatabaseSetStmt
|
|||||||
| CreateUserStmt
|
| CreateUserStmt
|
||||||
| ClusterStmt
|
| ClusterStmt
|
||||||
| DefineStmt
|
| DefineStmt
|
||||||
| DropStmt
|
| DropStmt
|
||||||
| DropSchemaStmt
|
| DropSchemaStmt
|
||||||
| TruncateStmt
|
| TruncateStmt
|
||||||
| CommentStmt
|
| CommentStmt
|
||||||
@ -518,20 +518,18 @@ stmt : AlterDatabaseSetStmt
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
CreateUserStmt: CREATE USER UserId OptUserList
|
CreateUserStmt: CREATE USER UserId opt_with OptUserList
|
||||||
{
|
|
||||||
CreateUserStmt *n = makeNode(CreateUserStmt);
|
|
||||||
n->user = $3;
|
|
||||||
n->options = $4;
|
|
||||||
$$ = (Node *)n;
|
|
||||||
}
|
|
||||||
| CREATE USER UserId WITH OptUserList
|
|
||||||
{
|
{
|
||||||
CreateUserStmt *n = makeNode(CreateUserStmt);
|
CreateUserStmt *n = makeNode(CreateUserStmt);
|
||||||
n->user = $3;
|
n->user = $3;
|
||||||
n->options = $5;
|
n->options = $5;
|
||||||
$$ = (Node *)n;
|
$$ = (Node *)n;
|
||||||
}
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
opt_with: WITH { $$ = TRUE; }
|
||||||
|
| /*EMPTY*/ { $$ = TRUE; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@ -541,14 +539,7 @@ CreateUserStmt: CREATE USER UserId OptUserList
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
AlterUserStmt: ALTER USER UserId OptUserList
|
AlterUserStmt: ALTER USER UserId opt_with OptUserList
|
||||||
{
|
|
||||||
AlterUserStmt *n = makeNode(AlterUserStmt);
|
|
||||||
n->user = $3;
|
|
||||||
n->options = $4;
|
|
||||||
$$ = (Node *)n;
|
|
||||||
}
|
|
||||||
| ALTER USER UserId WITH OptUserList
|
|
||||||
{
|
{
|
||||||
AlterUserStmt *n = makeNode(AlterUserStmt);
|
AlterUserStmt *n = makeNode(AlterUserStmt);
|
||||||
n->user = $3;
|
n->user = $3;
|
||||||
@ -600,19 +591,19 @@ OptUserList: OptUserList OptUserElem { $$ = lappend($1, $2); }
|
|||||||
;
|
;
|
||||||
|
|
||||||
OptUserElem: PASSWORD Sconst
|
OptUserElem: PASSWORD Sconst
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "password";
|
$$->defname = "password";
|
||||||
$$->arg = (Node *)makeString($2);
|
$$->arg = (Node *)makeString($2);
|
||||||
}
|
}
|
||||||
| ENCRYPTED PASSWORD Sconst
|
| ENCRYPTED PASSWORD Sconst
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "encryptedPassword";
|
$$->defname = "encryptedPassword";
|
||||||
$$->arg = (Node *)makeString($3);
|
$$->arg = (Node *)makeString($3);
|
||||||
}
|
}
|
||||||
| UNENCRYPTED PASSWORD Sconst
|
| UNENCRYPTED PASSWORD Sconst
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "unencryptedPassword";
|
$$->defname = "unencryptedPassword";
|
||||||
$$->arg = (Node *)makeString($3);
|
$$->arg = (Node *)makeString($3);
|
||||||
@ -624,37 +615,37 @@ OptUserElem: PASSWORD Sconst
|
|||||||
$$->arg = (Node *)makeInteger($2);
|
$$->arg = (Node *)makeInteger($2);
|
||||||
}
|
}
|
||||||
| CREATEDB
|
| CREATEDB
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "createdb";
|
$$->defname = "createdb";
|
||||||
$$->arg = (Node *)makeInteger(TRUE);
|
$$->arg = (Node *)makeInteger(TRUE);
|
||||||
}
|
}
|
||||||
| NOCREATEDB
|
| NOCREATEDB
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "createdb";
|
$$->defname = "createdb";
|
||||||
$$->arg = (Node *)makeInteger(FALSE);
|
$$->arg = (Node *)makeInteger(FALSE);
|
||||||
}
|
}
|
||||||
| CREATEUSER
|
| CREATEUSER
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "createuser";
|
$$->defname = "createuser";
|
||||||
$$->arg = (Node *)makeInteger(TRUE);
|
$$->arg = (Node *)makeInteger(TRUE);
|
||||||
}
|
}
|
||||||
| NOCREATEUSER
|
| NOCREATEUSER
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "createuser";
|
$$->defname = "createuser";
|
||||||
$$->arg = (Node *)makeInteger(FALSE);
|
$$->arg = (Node *)makeInteger(FALSE);
|
||||||
}
|
}
|
||||||
| IN_P GROUP_P user_list
|
| IN_P GROUP_P user_list
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "groupElts";
|
$$->defname = "groupElts";
|
||||||
$$->arg = (Node *)$3;
|
$$->arg = (Node *)$3;
|
||||||
}
|
}
|
||||||
| VALID UNTIL Sconst
|
| VALID UNTIL Sconst
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "validUntil";
|
$$->defname = "validUntil";
|
||||||
$$->arg = (Node *)makeString($3);
|
$$->arg = (Node *)makeString($3);
|
||||||
@ -680,14 +671,7 @@ user_list: user_list ',' UserId
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
CreateGroupStmt: CREATE GROUP_P UserId OptGroupList
|
CreateGroupStmt: CREATE GROUP_P UserId opt_with OptGroupList
|
||||||
{
|
|
||||||
CreateGroupStmt *n = makeNode(CreateGroupStmt);
|
|
||||||
n->name = $3;
|
|
||||||
n->options = $4;
|
|
||||||
$$ = (Node *)n;
|
|
||||||
}
|
|
||||||
| CREATE GROUP_P UserId WITH OptGroupList
|
|
||||||
{
|
{
|
||||||
CreateGroupStmt *n = makeNode(CreateGroupStmt);
|
CreateGroupStmt *n = makeNode(CreateGroupStmt);
|
||||||
n->name = $3;
|
n->name = $3;
|
||||||
@ -704,7 +688,7 @@ OptGroupList: OptGroupList OptGroupElem { $$ = lappend($1, $2); }
|
|||||||
;
|
;
|
||||||
|
|
||||||
OptGroupElem: USER user_list
|
OptGroupElem: USER user_list
|
||||||
{
|
{
|
||||||
$$ = makeNode(DefElem);
|
$$ = makeNode(DefElem);
|
||||||
$$->defname = "userElts";
|
$$->defname = "userElts";
|
||||||
$$->arg = (Node *)$2;
|
$$->arg = (Node *)$2;
|
||||||
@ -1504,7 +1488,7 @@ ColConstraintElem:
|
|||||||
n->keys = NULL;
|
n->keys = NULL;
|
||||||
$$ = (Node *)n;
|
$$ = (Node *)n;
|
||||||
}
|
}
|
||||||
| REFERENCES qualified_name opt_column_list key_match key_actions
|
| REFERENCES qualified_name opt_column_list key_match key_actions
|
||||||
{
|
{
|
||||||
FkConstraint *n = makeNode(FkConstraint);
|
FkConstraint *n = makeNode(FkConstraint);
|
||||||
n->constr_name = NULL;
|
n->constr_name = NULL;
|
||||||
@ -1880,7 +1864,7 @@ DropPLangStmt: DROP opt_procedural LANGUAGE ColId_or_Sconst
|
|||||||
opt_procedural: PROCEDURAL { $$ = TRUE; }
|
opt_procedural: PROCEDURAL { $$ = TRUE; }
|
||||||
| /*EMPTY*/ { $$ = TRUE; }
|
| /*EMPTY*/ { $$ = TRUE; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* QUERIES :
|
* QUERIES :
|
||||||
@ -1913,7 +1897,7 @@ CreateTrigStmt: CREATE TRIGGER name TriggerActionTime TriggerEvents ON
|
|||||||
$$ = (Node *)n;
|
$$ = (Node *)n;
|
||||||
}
|
}
|
||||||
| CREATE CONSTRAINT TRIGGER name AFTER TriggerEvents ON
|
| CREATE CONSTRAINT TRIGGER name AFTER TriggerEvents ON
|
||||||
qualified_name OptConstrFromTable
|
qualified_name OptConstrFromTable
|
||||||
ConstraintAttributeSpec
|
ConstraintAttributeSpec
|
||||||
FOR EACH ROW EXECUTE PROCEDURE
|
FOR EACH ROW EXECUTE PROCEDURE
|
||||||
func_name '(' TriggerFuncArgs ')'
|
func_name '(' TriggerFuncArgs ')'
|
||||||
@ -2237,13 +2221,13 @@ TruncateStmt: TRUNCATE opt_table qualified_name
|
|||||||
* the object associated with the comment. The form of the statement is:
|
* the object associated with the comment. The form of the statement is:
|
||||||
*
|
*
|
||||||
* COMMENT ON [ [ DATABASE | DOMAIN | INDEX | SEQUENCE | TABLE | TYPE | VIEW ]
|
* COMMENT ON [ [ DATABASE | DOMAIN | INDEX | SEQUENCE | TABLE | TYPE | VIEW ]
|
||||||
* <objname> | AGGREGATE <aggname> (<aggtype>) | FUNCTION
|
* <objname> | AGGREGATE <aggname> (<aggtype>) | FUNCTION
|
||||||
* <funcname> (arg1, arg2, ...) | OPERATOR <op>
|
* <funcname> (arg1, arg2, ...) | OPERATOR <op>
|
||||||
* (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON
|
* (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON
|
||||||
* <relname> | RULE <rulename> ON <relname> ] IS 'text'
|
* <relname> | RULE <rulename> ON <relname> ] IS 'text'
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
CommentStmt: COMMENT ON comment_type any_name IS comment_text
|
CommentStmt: COMMENT ON comment_type any_name IS comment_text
|
||||||
{
|
{
|
||||||
CommentStmt *n = makeNode(CommentStmt);
|
CommentStmt *n = makeNode(CommentStmt);
|
||||||
@ -2319,12 +2303,12 @@ comment_type: COLUMN { $$ = COLUMN; }
|
|||||||
| DOMAIN_P { $$ = TYPE_P; }
|
| DOMAIN_P { $$ = TYPE_P; }
|
||||||
| TYPE_P { $$ = TYPE_P; }
|
| TYPE_P { $$ = TYPE_P; }
|
||||||
| VIEW { $$ = VIEW; }
|
| VIEW { $$ = VIEW; }
|
||||||
;
|
;
|
||||||
|
|
||||||
comment_text: Sconst { $$ = $1; }
|
comment_text: Sconst { $$ = $1; }
|
||||||
| NULL_P { $$ = NULL; }
|
| NULL_P { $$ = NULL; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* QUERY:
|
* QUERY:
|
||||||
@ -2775,7 +2759,7 @@ RecipeStmt: EXECUTE RECIPE recipe_name
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args
|
CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args
|
||||||
RETURNS func_return createfunc_opt_list opt_with
|
RETURNS func_return createfunc_opt_list opt_definition
|
||||||
{
|
{
|
||||||
CreateFunctionStmt *n = makeNode(CreateFunctionStmt);
|
CreateFunctionStmt *n = makeNode(CreateFunctionStmt);
|
||||||
n->replace = $2;
|
n->replace = $2;
|
||||||
@ -2951,7 +2935,7 @@ func_as: Sconst
|
|||||||
{ $$ = makeList2(makeString($1), makeString($3)); }
|
{ $$ = makeList2(makeString($1), makeString($3)); }
|
||||||
;
|
;
|
||||||
|
|
||||||
opt_with: WITH definition { $$ = $2; }
|
opt_definition: WITH definition { $$ = $2; }
|
||||||
| /*EMPTY*/ { $$ = NIL; }
|
| /*EMPTY*/ { $$ = NIL; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3118,7 +3102,7 @@ RuleStmt: CREATE RULE name AS
|
|||||||
|
|
||||||
RuleActionList: NOTHING { $$ = NIL; }
|
RuleActionList: NOTHING { $$ = NIL; }
|
||||||
| RuleActionStmt { $$ = makeList1($1); }
|
| RuleActionStmt { $$ = makeList1($1); }
|
||||||
| '(' RuleActionMulti ')' { $$ = $2; }
|
| '(' RuleActionMulti ')' { $$ = $2; }
|
||||||
;
|
;
|
||||||
|
|
||||||
/* the thrashing around here is to discard "empty" statements... */
|
/* the thrashing around here is to discard "empty" statements... */
|
||||||
@ -3324,7 +3308,7 @@ LoadStmt: LOAD file_name
|
|||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
CreatedbStmt: CREATE DATABASE database_name WITH createdb_opt_list
|
CreatedbStmt: CREATE DATABASE database_name opt_with createdb_opt_list
|
||||||
{
|
{
|
||||||
CreatedbStmt *n = makeNode(CreatedbStmt);
|
CreatedbStmt *n = makeNode(CreatedbStmt);
|
||||||
List *l;
|
List *l;
|
||||||
@ -3425,7 +3409,7 @@ createdb_opt_item: LOCATION opt_equal Sconst
|
|||||||
{
|
{
|
||||||
$$ = lconsi(3, makeListi1(-1));
|
$$ = lconsi(3, makeListi1(-1));
|
||||||
}
|
}
|
||||||
| OWNER opt_equal name
|
| OWNER opt_equal name
|
||||||
{
|
{
|
||||||
$$ = lconsi(4, makeList1($3));
|
$$ = lconsi(4, makeList1($3));
|
||||||
}
|
}
|
||||||
@ -3437,7 +3421,8 @@ createdb_opt_item: LOCATION opt_equal Sconst
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Though the equals sign doesn't match other WITH options, pg_dump uses
|
* Though the equals sign doesn't match other WITH options, pg_dump uses
|
||||||
* equals for backward compability, and it doesn't seem worth remove it.
|
* equals for backward compability, and it doesn't seem worth removing it.
|
||||||
|
* 2002-02-25
|
||||||
*/
|
*/
|
||||||
opt_equal: '=' { $$ = TRUE; }
|
opt_equal: '=' { $$ = TRUE; }
|
||||||
| /*EMPTY*/ { $$ = FALSE; }
|
| /*EMPTY*/ { $$ = FALSE; }
|
||||||
@ -3496,7 +3481,7 @@ CreateDomainStmt: CREATE DOMAIN_P any_name opt_as Typename ColQualList opt_coll
|
|||||||
n->domainname = $3;
|
n->domainname = $3;
|
||||||
n->typename = $5;
|
n->typename = $5;
|
||||||
n->constraints = $6;
|
n->constraints = $6;
|
||||||
|
|
||||||
if ($7 != NULL)
|
if ($7 != NULL)
|
||||||
elog(NOTICE,"CREATE DOMAIN / COLLATE %s not yet "
|
elog(NOTICE,"CREATE DOMAIN / COLLATE %s not yet "
|
||||||
"implemented; clause ignored", $7);
|
"implemented; clause ignored", $7);
|
||||||
@ -3940,7 +3925,7 @@ simple_select: SELECT opt_distinct target_list
|
|||||||
$$ = (Node *)n;
|
$$ = (Node *)n;
|
||||||
}
|
}
|
||||||
| select_clause UNION opt_all select_clause
|
| select_clause UNION opt_all select_clause
|
||||||
{
|
{
|
||||||
$$ = makeSetOp(SETOP_UNION, $3, $1, $4);
|
$$ = makeSetOp(SETOP_UNION, $3, $1, $4);
|
||||||
}
|
}
|
||||||
| select_clause INTERSECT opt_all select_clause
|
| select_clause INTERSECT opt_all select_clause
|
||||||
@ -3951,7 +3936,7 @@ simple_select: SELECT opt_distinct target_list
|
|||||||
{
|
{
|
||||||
$$ = makeSetOp(SETOP_EXCEPT, $3, $1, $4);
|
$$ = makeSetOp(SETOP_EXCEPT, $3, $1, $4);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
into_clause: INTO OptTempTableName { $$ = $2; }
|
into_clause: INTO OptTempTableName { $$ = $2; }
|
||||||
| /*EMPTY*/ { $$ = NULL; }
|
| /*EMPTY*/ { $$ = NULL; }
|
||||||
@ -3962,22 +3947,22 @@ into_clause: INTO OptTempTableName { $$ = $2; }
|
|||||||
* since TEMP is not a reserved word. See also OptTemp.
|
* since TEMP is not a reserved word. See also OptTemp.
|
||||||
*/
|
*/
|
||||||
OptTempTableName: TEMPORARY opt_table qualified_name
|
OptTempTableName: TEMPORARY opt_table qualified_name
|
||||||
{
|
{
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
$$->istemp = true;
|
$$->istemp = true;
|
||||||
}
|
}
|
||||||
| TEMP opt_table qualified_name
|
| TEMP opt_table qualified_name
|
||||||
{
|
{
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
$$->istemp = true;
|
$$->istemp = true;
|
||||||
}
|
}
|
||||||
| LOCAL TEMPORARY opt_table qualified_name
|
| LOCAL TEMPORARY opt_table qualified_name
|
||||||
{
|
{
|
||||||
$$ = $4;
|
$$ = $4;
|
||||||
$$->istemp = true;
|
$$->istemp = true;
|
||||||
}
|
}
|
||||||
| LOCAL TEMP opt_table qualified_name
|
| LOCAL TEMP opt_table qualified_name
|
||||||
{
|
{
|
||||||
$$ = $4;
|
$$ = $4;
|
||||||
$$->istemp = true;
|
$$->istemp = true;
|
||||||
}
|
}
|
||||||
@ -3994,12 +3979,12 @@ OptTempTableName: TEMPORARY opt_table qualified_name
|
|||||||
$$->istemp = true;
|
$$->istemp = true;
|
||||||
}
|
}
|
||||||
| TABLE qualified_name
|
| TABLE qualified_name
|
||||||
{
|
{
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
$$->istemp = false;
|
$$->istemp = false;
|
||||||
}
|
}
|
||||||
| qualified_name
|
| qualified_name
|
||||||
{
|
{
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$->istemp = false;
|
$$->istemp = false;
|
||||||
}
|
}
|
||||||
@ -6122,7 +6107,7 @@ insert_target_list: insert_target_list ',' insert_target_el
|
|||||||
;
|
;
|
||||||
|
|
||||||
insert_target_el: target_el { $$ = $1; }
|
insert_target_el: target_el { $$ = $1; }
|
||||||
| DEFAULT {
|
| DEFAULT {
|
||||||
InsertDefault *def = makeNode(InsertDefault);
|
InsertDefault *def = makeNode(InsertDefault);
|
||||||
$$ = makeNode(ResTarget);
|
$$ = makeNode(ResTarget);
|
||||||
$$->name = NULL;
|
$$->name = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user