* Tom Lane ([EMAIL PROTECTED]) wrote:
> Stephen Frost <[EMAIL PROTECTED]> writes:
> > Ok, should I change SchemaName & SavePointId back to ColId,
>
> I'd just leave them as ColId. I don't think much would be gained by
> introducing those productions.
Done, here's the patch.
Thanks,
Stephen
diff -u -u -r2.480 gram.y
--- src/backend/parser/gram.y 8 Nov 2004 04:02:20 -0000 2.480
+++ src/backend/parser/gram.y 29 Dec 2004 19:04:29 -0000
@@ -304,7 +304,7 @@
%type <ival> Iconst
%type <str> Sconst comment_text
-%type <str> UserId opt_boolean ColId_or_Sconst
+%type <str> RoleId opt_boolean ColId_or_Sconst
%type <list> var_list var_list_or_default
%type <str> ColId ColLabel var_name type_name param_name
%type <node> var_value zone_value
@@ -570,7 +570,7 @@
*****************************************************************************/
CreateUserStmt:
- CREATE USER UserId opt_with OptUserList
+ CREATE USER RoleId opt_with OptUserList
{
CreateUserStmt *n =
makeNode(CreateUserStmt);
n->user = $3;
@@ -592,7 +592,7 @@
*****************************************************************************/
AlterUserStmt:
- ALTER USER UserId opt_with OptUserList
+ ALTER USER RoleId opt_with OptUserList
{
AlterUserStmt *n =
makeNode(AlterUserStmt);
n->user = $3;
@@ -603,7 +603,7 @@
AlterUserSetStmt:
- ALTER USER UserId SET set_rest
+ ALTER USER RoleId SET set_rest
{
AlterUserSetStmt *n =
makeNode(AlterUserSetStmt);
n->user = $3;
@@ -611,7 +611,7 @@
n->value = $5->args;
$$ = (Node *)n;
}
- | ALTER USER UserId VariableResetStmt
+ | ALTER USER RoleId VariableResetStmt
{
AlterUserSetStmt *n =
makeNode(AlterUserSetStmt);
n->user = $3;
@@ -691,8 +691,8 @@
}
;
-user_list: user_list ',' UserId { $$ = lappend($1,
makeString($3)); }
- | UserId { $$ =
list_make1(makeString($1)); }
+user_list: user_list ',' RoleId { $$ = lappend($1,
makeString($3)); }
+ | RoleId { $$ =
list_make1(makeString($1)); }
;
@@ -705,7 +705,7 @@
*****************************************************************************/
CreateGroupStmt:
- CREATE GROUP_P UserId opt_with OptGroupList
+ CREATE GROUP_P RoleId opt_with OptGroupList
{
CreateGroupStmt *n =
makeNode(CreateGroupStmt);
n->name = $3;
@@ -742,7 +742,7 @@
*****************************************************************************/
AlterGroupStmt:
- ALTER GROUP_P UserId add_drop USER user_list
+ ALTER GROUP_P RoleId add_drop USER user_list
{
AlterGroupStmt *n =
makeNode(AlterGroupStmt);
n->name = $3;
@@ -765,7 +765,7 @@
*****************************************************************************/
DropGroupStmt:
- DROP GROUP_P UserId
+ DROP GROUP_P RoleId
{
DropGroupStmt *n =
makeNode(DropGroupStmt);
n->name = $3;
@@ -781,7 +781,7 @@
*****************************************************************************/
CreateSchemaStmt:
- CREATE SCHEMA OptSchemaName AUTHORIZATION UserId
OptSchemaEltList
+ CREATE SCHEMA OptSchemaName AUTHORIZATION RoleId
OptSchemaEltList
{
CreateSchemaStmt *n =
makeNode(CreateSchemaStmt);
/* One can omit the schema name or the
authorization id. */
@@ -1300,8 +1300,8 @@
/* Subcommands that are for ALTER TABLE or ALTER INDEX */
alter_rel_cmd:
- /* ALTER [TABLE|INDEX] <name> OWNER TO UserId */
- OWNER TO UserId
+ /* ALTER [TABLE|INDEX] <name> OWNER TO RoleId */
+ OWNER TO RoleId
{
AlterTableCmd *n =
makeNode(AlterTableCmd);
n->subtype = AT_ChangeOwner;
@@ -3128,7 +3128,7 @@
| grantee_list ',' grantee
{ $$ = lappend($1, $3); }
;
-grantee: ColId
+grantee: RoleId
{
PrivGrantee *n = makeNode(PrivGrantee);
/* This hack lets us avoid reserving
PUBLIC as a keyword*/
@@ -3139,7 +3139,7 @@
n->groupname = NULL;
$$ = (Node *)n;
}
- | GROUP_P ColId
+ | GROUP_P RoleId
{
PrivGrantee *n = makeNode(PrivGrantee);
/* Treat GROUP PUBLIC as a synonym for
PUBLIC */
@@ -3632,7 +3632,7 @@
n->newname = $7;
$$ = (Node *)n;
}
- | ALTER GROUP_P UserId RENAME TO UserId
+ | ALTER GROUP_P RoleId RENAME TO RoleId
{
RenameStmt *n = makeNode(RenameStmt);
n->renameType = OBJECT_GROUP;
@@ -3701,7 +3701,7 @@
n->renameType = OBJECT_TRIGGER;
$$ = (Node *)n;
}
- | ALTER USER UserId RENAME TO UserId
+ | ALTER USER RoleId RENAME TO RoleId
{
RenameStmt *n = makeNode(RenameStmt);
n->renameType = OBJECT_USER;
@@ -3730,7 +3730,7 @@
*
*****************************************************************************/
-AlterOwnerStmt: ALTER AGGREGATE func_name '(' aggr_argtype ')' OWNER TO UserId
+AlterOwnerStmt: ALTER AGGREGATE func_name '(' aggr_argtype ')' OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_AGGREGATE;
@@ -3739,7 +3739,7 @@
n->newowner = $9;
$$ = (Node *)n;
}
- | ALTER CONVERSION_P any_name OWNER TO UserId
+ | ALTER CONVERSION_P any_name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_CONVERSION;
@@ -3747,7 +3747,7 @@
n->newowner = $6;
$$ = (Node *)n;
}
- | ALTER DATABASE database_name OWNER TO UserId
+ | ALTER DATABASE database_name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_DATABASE;
@@ -3755,7 +3755,7 @@
n->newowner = $6;
$$ = (Node *)n;
}
- | ALTER DOMAIN_P any_name OWNER TO UserId
+ | ALTER DOMAIN_P any_name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_DOMAIN;
@@ -3763,7 +3763,7 @@
n->newowner = $6;
$$ = (Node *)n;
}
- | ALTER FUNCTION func_name func_args OWNER TO UserId
+ | ALTER FUNCTION func_name func_args OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_FUNCTION;
@@ -3772,7 +3772,7 @@
n->newowner = $7;
$$ = (Node *)n;
}
- | ALTER OPERATOR any_operator '(' oper_argtypes ')'
OWNER TO UserId
+ | ALTER OPERATOR any_operator '(' oper_argtypes ')'
OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_OPERATOR;
@@ -3781,7 +3781,7 @@
n->newowner = $9;
$$ = (Node *)n;
}
- | ALTER OPERATOR CLASS any_name USING access_method
OWNER TO UserId
+ | ALTER OPERATOR CLASS any_name USING access_method
OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_OPCLASS;
@@ -3790,7 +3790,7 @@
n->newowner = $9;
$$ = (Node *)n;
}
- | ALTER SCHEMA name OWNER TO UserId
+ | ALTER SCHEMA name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_SCHEMA;
@@ -3798,7 +3798,7 @@
n->newowner = $6;
$$ = (Node *)n;
}
- | ALTER TYPE_P any_name OWNER TO UserId
+ | ALTER TYPE_P any_name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_TYPE;
@@ -3806,7 +3806,7 @@
n->newowner = $6;
$$ = (Node *)n;
}
- | ALTER TABLESPACE name OWNER TO UserId
+ | ALTER TABLESPACE name OWNER TO RoleId
{
AlterOwnerStmt *n =
makeNode(AlterOwnerStmt);
n->objectType = OBJECT_TABLESPACE;
@@ -7568,7 +7568,7 @@
Iconst: ICONST
{ $$ = $1; };
Sconst: SCONST
{ $$ = $1; };
-UserId: ColId
{ $$ = $1; };
+RoleId: ColId
{ $$ = $1; };
/*
* Name classification hierarchy.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]