Skip to content

Commit 5f8b22c

Browse files
committed
Fix wrong dependency on owner created by ALTER OPCLASS OWNER.
Per Alvaro.
1 parent 2c57528 commit 5f8b22c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/commands/opclasscmds.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.36 2005/08/22 17:38:20 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.37 2005/08/23 01:41:30 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -926,6 +926,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId)
926926
errmsg("operator class \"%s\" does not exist for access method \"%s\"",
927927
opcname, access_method)));
928928

929+
opcOid = HeapTupleGetOid(tup);
929930
}
930931
else
931932
{
@@ -981,7 +982,7 @@ AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId)
981982
CatalogUpdateIndexes(rel, tup);
982983

983984
/* Update owner dependency reference */
984-
changeDependencyOnOwner(OperatorClassRelationId, amOid, newOwnerId);
985+
changeDependencyOnOwner(OperatorClassRelationId, opcOid, newOwnerId);
985986
}
986987

987988
heap_close(rel, NoLock);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy