diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-09-27 18:13:09 -0300 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2012-10-02 18:13:54 -0300 |
| commit | 2164f9a1254980a02ef9ca99ee3bcb8c1298b219 (patch) | |
| tree | ee8a05a3997289cbcde799728f1b4a81601bc64c /src/backend/commands/collationcmds.c | |
| parent | a563d941803535dbd27d4191fe7729497b7fdf31 (diff) | |
| download | postgresql-2164f9a1254980a02ef9ca99ee3bcb8c1298b219.tar.gz | |
Refactor "ALTER some-obj SET SCHEMA" implementation
Instead of having each object type implement the catalog munging
independently, centralize knowledge about how to do it and expand the
existing table in objectaddress.c with enough data about each object
type to support this operation.
Author: KaiGai Kohei
Tweaks by me
Reviewed by Robert Haas
Diffstat (limited to 'src/backend/commands/collationcmds.c')
| -rw-r--r-- | src/backend/commands/collationcmds.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c index ad7528828b..8918bfc15b 100644 --- a/src/backend/commands/collationcmds.c +++ b/src/backend/commands/collationcmds.c @@ -339,7 +339,7 @@ AlterCollationNamespace_oid(Oid collOid, Oid newNspOid) /* * We have to check for name collision ourselves, because - * AlterObjectNamespace doesn't know how to deal with the encoding + * AlterObjectNamespace_internal doesn't know how to deal with the encoding * considerations. */ collation_name = get_collation_name(collOid); @@ -370,12 +370,7 @@ AlterCollationNamespace_oid(Oid collOid, Oid newNspOid) get_namespace_name(newNspOid)))); /* OK, do the work */ - oldNspOid = AlterObjectNamespace(rel, COLLOID, -1, - collOid, newNspOid, - Anum_pg_collation_collname, - Anum_pg_collation_collnamespace, - Anum_pg_collation_collowner, - ACL_KIND_COLLATION); + oldNspOid = AlterObjectNamespace_internal(rel, collOid, newNspOid); heap_close(rel, RowExclusiveLock); |
