1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Replace pg_shadow and pg_group by new role-capable catalogs pg_authid

and pg_auth_members.  There are still many loose ends to finish in this
patch (no documentation, no regression tests, no pg_dump support for
instance).  But I'm going to commit it now anyway so that Alvaro can
make some progress on shared dependencies.  The catalog changes should
be pretty much done.
This commit is contained in:
Tom Lane
2005-06-28 05:09:14 +00:00
parent 977530d8da
commit 7762619e95
96 changed files with 3338 additions and 3240 deletions

View File

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.309 2005/06/26 22:05:37 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.310 2005/06/28 05:08:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1761,8 +1761,7 @@ _copyPrivGrantee(PrivGrantee *from)
{
PrivGrantee *newnode = makeNode(PrivGrantee);
COPY_STRING_FIELD(username);
COPY_STRING_FIELD(groupname);
COPY_STRING_FIELD(rolname);
return newnode;
}
@ -1778,6 +1777,21 @@ _copyFuncWithArgs(FuncWithArgs *from)
return newnode;
}
static GrantRoleStmt *
_copyGrantRoleStmt(GrantRoleStmt *from)
{
GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
COPY_NODE_FIELD(granted_roles);
COPY_NODE_FIELD(grantee_roles);
COPY_SCALAR_FIELD(is_grant);
COPY_SCALAR_FIELD(admin_opt);
COPY_STRING_FIELD(grantor);
COPY_SCALAR_FIELD(behavior);
return newnode;
}
static DeclareCursorStmt *
_copyDeclareCursorStmt(DeclareCursorStmt *from)
{
@ -2374,46 +2388,47 @@ _copyDropPLangStmt(DropPLangStmt *from)
return newnode;
}
static CreateUserStmt *
_copyCreateUserStmt(CreateUserStmt *from)
static CreateRoleStmt *
_copyCreateRoleStmt(CreateRoleStmt *from)
{
CreateUserStmt *newnode = makeNode(CreateUserStmt);
CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
COPY_STRING_FIELD(user);
COPY_STRING_FIELD(role);
COPY_NODE_FIELD(options);
return newnode;
}
static AlterUserStmt *
_copyAlterUserStmt(AlterUserStmt *from)
static AlterRoleStmt *
_copyAlterRoleStmt(AlterRoleStmt *from)
{
AlterUserStmt *newnode = makeNode(AlterUserStmt);
AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
COPY_STRING_FIELD(user);
COPY_STRING_FIELD(role);
COPY_NODE_FIELD(options);
COPY_SCALAR_FIELD(action);
return newnode;
}
static AlterUserSetStmt *
_copyAlterUserSetStmt(AlterUserSetStmt *from)
static AlterRoleSetStmt *
_copyAlterRoleSetStmt(AlterRoleSetStmt *from)
{
AlterUserSetStmt *newnode = makeNode(AlterUserSetStmt);
AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
COPY_STRING_FIELD(user);
COPY_STRING_FIELD(role);
COPY_STRING_FIELD(variable);
COPY_NODE_FIELD(value);
return newnode;
}
static DropUserStmt *
_copyDropUserStmt(DropUserStmt *from)
static DropRoleStmt *
_copyDropRoleStmt(DropRoleStmt *from)
{
DropUserStmt *newnode = makeNode(DropUserStmt);
DropRoleStmt *newnode = makeNode(DropRoleStmt);
COPY_NODE_FIELD(users);
COPY_NODE_FIELD(roles);
return newnode;
}
@ -2441,39 +2456,6 @@ _copyConstraintsSetStmt(ConstraintsSetStmt *from)
return newnode;
}
static CreateGroupStmt *
_copyCreateGroupStmt(CreateGroupStmt *from)
{
CreateGroupStmt *newnode = makeNode(CreateGroupStmt);
COPY_STRING_FIELD(name);
COPY_NODE_FIELD(options);
return newnode;
}
static AlterGroupStmt *
_copyAlterGroupStmt(AlterGroupStmt *from)
{
AlterGroupStmt *newnode = makeNode(AlterGroupStmt);
COPY_STRING_FIELD(name);
COPY_SCALAR_FIELD(action);
COPY_NODE_FIELD(listUsers);
return newnode;
}
static DropGroupStmt *
_copyDropGroupStmt(DropGroupStmt *from)
{
DropGroupStmt *newnode = makeNode(DropGroupStmt);
COPY_STRING_FIELD(name);
return newnode;
}
static ReindexStmt *
_copyReindexStmt(ReindexStmt *from)
{
@ -2927,6 +2909,9 @@ copyObject(void *from)
case T_GrantStmt:
retval = _copyGrantStmt(from);
break;
case T_GrantRoleStmt:
retval = _copyGrantRoleStmt(from);
break;
case T_DeclareCursorStmt:
retval = _copyDeclareCursorStmt(from);
break;
@ -3071,17 +3056,17 @@ copyObject(void *from)
case T_DropPLangStmt:
retval = _copyDropPLangStmt(from);
break;
case T_CreateUserStmt:
retval = _copyCreateUserStmt(from);
case T_CreateRoleStmt:
retval = _copyCreateRoleStmt(from);
break;
case T_AlterUserStmt:
retval = _copyAlterUserStmt(from);
case T_AlterRoleStmt:
retval = _copyAlterRoleStmt(from);
break;
case T_AlterUserSetStmt:
retval = _copyAlterUserSetStmt(from);
case T_AlterRoleSetStmt:
retval = _copyAlterRoleSetStmt(from);
break;
case T_DropUserStmt:
retval = _copyDropUserStmt(from);
case T_DropRoleStmt:
retval = _copyDropRoleStmt(from);
break;
case T_LockStmt:
retval = _copyLockStmt(from);
@ -3089,15 +3074,6 @@ copyObject(void *from)
case T_ConstraintsSetStmt:
retval = _copyConstraintsSetStmt(from);
break;
case T_CreateGroupStmt:
retval = _copyCreateGroupStmt(from);
break;
case T_AlterGroupStmt:
retval = _copyAlterGroupStmt(from);
break;
case T_DropGroupStmt:
retval = _copyDropGroupStmt(from);
break;
case T_ReindexStmt:
retval = _copyReindexStmt(from);
break;