mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
refactor ALTER some-obj SET OWNER implementation
Remove duplicate implementation of catalog munging and miscellaneous privilege and consistency checks. Instead rely on already existing data in objectaddress.c to do the work. Author: KaiGai Kohei Tweaked by me Reviewed by Robert Haas
This commit is contained in:
@ -267,18 +267,3 @@ RenameAggregate(List *name, List *args, const char *newname)
|
||||
heap_close(rel, NoLock);
|
||||
heap_freetuple(tup);
|
||||
}
|
||||
|
||||
/*
|
||||
* Change aggregate owner
|
||||
*/
|
||||
void
|
||||
AlterAggregateOwner(List *name, List *args, Oid newOwnerId)
|
||||
{
|
||||
Oid procOid;
|
||||
|
||||
/* Look up function and make sure it's an aggregate */
|
||||
procOid = LookupAggNameTypeNames(name, args, false);
|
||||
|
||||
/* The rest is just like a function */
|
||||
AlterFunctionOwner_oid(procOid, newOwnerId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user