Commit 5f8b22c2 authored by Tom Lane's avatar Tom Lane

Fix wrong dependency on owner created by ALTER OPCLASS OWNER.

Per Alvaro.
parent 2c575284
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.36 2005/08/22 17:38:20 tgl Exp $ * $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.37 2005/08/23 01:41:30 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -926,6 +926,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId) ...@@ -926,6 +926,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId)
errmsg("operator class \"%s\" does not exist for access method \"%s\"", errmsg("operator class \"%s\" does not exist for access method \"%s\"",
opcname, access_method))); opcname, access_method)));
opcOid = HeapTupleGetOid(tup);
} }
else else
{ {
...@@ -981,7 +982,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId) ...@@ -981,7 +982,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId)
CatalogUpdateIndexes(rel, tup); CatalogUpdateIndexes(rel, tup);
/* Update owner dependency reference */ /* Update owner dependency reference */
changeDependencyOnOwner(OperatorClassRelationId, amOid, newOwnerId); changeDependencyOnOwner(OperatorClassRelationId, opcOid, newOwnerId);
} }
heap_close(rel, NoLock); heap_close(rel, NoLock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment