mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
Merge ALTER GROUP ADD/DROP rules by creating add_drop action.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.324 2002/06/17 05:40:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.325 2002/06/17 07:00:24 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -152,7 +152,7 @@ static void doNegateFloat(Value *v);
|
||||
simple_select
|
||||
|
||||
%type <node> alter_column_default
|
||||
%type <ival> drop_behavior, opt_drop_behavior
|
||||
%type <ival> add_drop, drop_behavior, opt_drop_behavior
|
||||
|
||||
%type <list> createdb_opt_list, createdb_opt_item
|
||||
%type <boolean> opt_equal
|
||||
@@ -200,17 +200,19 @@ static void doNegateFloat(Value *v);
|
||||
%type <chr> TriggerOneEvent
|
||||
|
||||
%type <list> stmtblock, stmtmulti,
|
||||
OptTableElementList, OptInherit, definition, opt_distinct,
|
||||
opt_definition, func_args, func_args_list, func_as, createfunc_opt_list
|
||||
OptTableElementList, OptInherit, definition,
|
||||
opt_distinct, opt_definition, func_args,
|
||||
func_args_list, func_as, createfunc_opt_list
|
||||
oper_argtypes, RuleActionList, RuleActionMulti,
|
||||
opt_column_list, columnList, opt_name_list,
|
||||
sort_clause, sortby_list, index_params, index_list, name_list,
|
||||
from_clause, from_list, opt_array_bounds, qualified_name_list,
|
||||
any_name, any_name_list, any_operator, expr_list, dotted_name, attrs,
|
||||
sort_clause, sortby_list, index_params, index_list,
|
||||
name_list, from_clause, from_list, opt_array_bounds,
|
||||
qualified_name_list, any_name, any_name_list,
|
||||
any_operator, expr_list, dotted_name, attrs,
|
||||
target_list, update_target_list, insert_column_list,
|
||||
insert_target_list,
|
||||
def_list, opt_indirection, group_clause, TriggerFuncArgs,
|
||||
select_limit, opt_select_limit
|
||||
insert_target_list, def_list, opt_indirection,
|
||||
group_clause, TriggerFuncArgs, select_limit,
|
||||
opt_select_limit
|
||||
|
||||
%type <range> into_clause, OptTempTableName
|
||||
|
||||
@@ -709,24 +711,20 @@ OptGroupElem: USER user_list
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
AlterGroupStmt: ALTER GROUP_P UserId ADD USER user_list
|
||||
AlterGroupStmt: ALTER GROUP_P UserId add_drop USER user_list
|
||||
{
|
||||
AlterGroupStmt *n = makeNode(AlterGroupStmt);
|
||||
n->name = $3;
|
||||
n->action = +1;
|
||||
n->listUsers = $6;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
| ALTER GROUP_P UserId DROP USER user_list
|
||||
{
|
||||
AlterGroupStmt *n = makeNode(AlterGroupStmt);
|
||||
n->name = $3;
|
||||
n->action = -1;
|
||||
n->action = $4;
|
||||
n->listUsers = $6;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
;
|
||||
|
||||
add_drop: ADD { $$ = +1; }
|
||||
| DROP { $$ = -1; }
|
||||
;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
Reference in New Issue
Block a user