1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Support renaming of tablespaces, and changing the owners of

aggregates, conversions, functions, operators, operator classes,
schemas, types, and tablespaces.  Fold the existing implementations
of alter domain owner and alter database owner in with these.

Christopher Kings-Lynne
This commit is contained in:
Tom Lane
2004-06-25 21:55:59 +00:00
parent 1621192b11
commit 0adfa2c39d
40 changed files with 1380 additions and 234 deletions

View File

@@ -18,7 +18,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.225 2004/06/18 06:13:28 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.226 2004/06/25 21:55:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -991,6 +991,19 @@ _equalRenameStmt(RenameStmt *a, RenameStmt *b)
return true;
}
static bool
_equalAlterOwnerStmt(AlterOwnerStmt *a, AlterOwnerStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(object);
COMPARE_NODE_FIELD(objarg);
COMPARE_STRING_FIELD(addname);
COMPARE_STRING_FIELD(newowner);
COMPARE_SCALAR_FIELD(objectType);
return true;
}
static bool
_equalRuleStmt(RuleStmt *a, RuleStmt *b)
{
@@ -1110,15 +1123,6 @@ _equalCreatedbStmt(CreatedbStmt *a, CreatedbStmt *b)
return true;
}
static bool
_equalAlterDbOwnerStmt(AlterDbOwnerStmt *a, AlterDbOwnerStmt *b)
{
COMPARE_STRING_FIELD(dbname);
COMPARE_STRING_FIELD(uname);
return true;
}
static bool
_equalAlterDatabaseSetStmt(AlterDatabaseSetStmt *a, AlterDatabaseSetStmt *b)
{
@@ -2008,6 +2012,9 @@ equal(void *a, void *b)
case T_RenameStmt:
retval = _equalRenameStmt(a, b);
break;
case T_AlterOwnerStmt:
retval = _equalAlterOwnerStmt(a, b);
break;
case T_RuleStmt:
retval = _equalRuleStmt(a, b);
break;
@@ -2044,9 +2051,6 @@ equal(void *a, void *b)
case T_CreatedbStmt:
retval = _equalCreatedbStmt(a, b);
break;
case T_AlterDbOwnerStmt:
retval = _equalAlterDbOwnerStmt(a, b);
break;
case T_AlterDatabaseSetStmt:
retval = _equalAlterDatabaseSetStmt(a, b);
break;