Merge ALTER GROUP ADD/DROP rules by creating add_drop action.

This commit is contained in:
Bruce Momjian 2002-06-17 07:00:27 +00:00
parent f91ee129a7
commit 10f05d8127
16 changed files with 19 additions and 39317 deletions

View File

@ -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; }
;
/*****************************************************************************
*

View File

@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for MAC addresses.
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.23 2002/06/15 19:39:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.24 2002/06/17 07:00:26 momjian Exp $
*/
#include "postgres.h"
@ -48,7 +48,6 @@ macaddr_in(PG_FUNCTION_ARGS)
count = sscanf(str, "%2x%2x.%2x%2x.%2x%2x", &a, &b, &c, &d, &e, &f);
if (count != 6)
count = sscanf(str, "%2x%2x%2x%2x%2x%2x", &a, &b, &c, &d, &e, &f);
if (count != 6)
elog(ERROR, "macaddr_in: error in parsing \"%s\"", str);

View File

@ -1,4 +0,0 @@
56 7.8
100 99.097
0 0.09561
42 324.78

View File

@ -1,2 +0,0 @@
5 !check failed 6
7 check failed 6

View File

@ -1,2 +0,0 @@
4 !check failed 5
6 OK 4

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
sharon 25 (15,12) 1000 sam
sam 30 (10,5) 2000 bill
bill 20 (11,10) 1000 sharon

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +0,0 @@
mike 40 (3.1,6.2)
joe 20 (5.5,2.5)
sally 34 (3.8,45.8)
sandra 19 (9.345,09.6)
alex 30 (1.352,8.2)
sue 50 (8.34,7.375)
denise 24 (3.78,87.90)
sarah 88 (8.4,2.3)
teresa 38 (7.7,1.8)
nan 28 (6.35,0.43)
leah 68 (0.6,3.37)
wendy 78 (2.62,03.3)
melissa 28 (3.089,087.23)
joan 18 (9.4,47.04)
mary 08 (3.7,39.20)
jane 58 (1.34,0.44)
liza 38 (9.76,6.90)
jean 28 (8.561,7.3)
jenifer 38 (6.6,23.3)
juanita 58 (4.57,35.8)
susan 78 (6.579,3)
zena 98 (0.35,0)
martie 88 (8.358,.93)
chris 78 (9.78,2)
pat 18 (1.19,0.6)
zola 58 (2.56,4.3)
louise 98 (5.0,8.7)
edna 18 (1.53,3.5)
bertha 88 (2.75,9.4)
sumi 38 (1.15,0.6)
koko 88 (1.7,5.5)
gina 18 (9.82,7.5)
rean 48 (8.5,5.0)
sharon 78 (9.237,8.8)
paula 68 (0.5,0.5)
julie 68 (3.6,7.2)
belinda 38 (8.9,1.7)
karen 48 (8.73,0.0)
carina 58 (4.27,8.8)
diane 18 (5.912,5.3)
esther 98 (5.36,7.6)
trudy 88 (6.01,0.5)
fanny 08 (1.2,0.9)
carmen 78 (3.8,8.2)
lita 25 (1.3,8.7)
pamela 48 (8.21,9.3)
sandy 38 (3.8,0.2)
trisha 88 (1.29,2.2)
vera 78 (9.73,6.4)
velma 68 (8.8,8.9)

View File

@ -1,5 +0,0 @@
0 Oakland ((-122,37.9),(-121.7,37.9),(-121.7,37.4),(-122,37.4))
0 Oakland ((-121.7,37.4),(-121.7,37),(-122.1,37),(-122.1,37.3),(-122,37.3),(-122,37.4))
0 Oakland ((-122.1,37.3),(-122.2,37.5),(-122,37.5))
0 Berkeley ((-122.3,37.9),(-122,37.9),(-122,37.6),(-122.3,37.6))
0 Lafayette ((-122.3,37.4),(-122.2,37.4),(-122.2,37),(-122.3,37))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
jeff 23 (8,7.7) 600 sharon 3.50000000000000000e+00 \N
cim 30 (10.5,4.7) 400 \N 3.39999999999999990e+00 \N
linda 19 (0.9,6.1) 100 \N 2.89999999999999990e+00 \N

View File

@ -1,2 +0,0 @@
fred 28 (3.1,-1.5) 3.70000000000000020e+00
larry 60 (21.8,4.9) 3.10000000000000010e+00

File diff suppressed because it is too large Load Diff