Don't add a shared dependency on the owner of a composite type in pg_class.

We track the owner in pg_type instead, as that is the place where the owner is
changed on ALTER TYPE ... OWNER TO.
This commit is contained in:
Alvaro Herrera 2006-04-24 01:40:48 +00:00
parent 109d0aeb11
commit 732a1fd1d0

View file

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.295 2006/03/05 15:58:22 momjian Exp $
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.296 2006/04/24 01:40:48 alvherre Exp $
*
*
* INTERFACE ROUTINES
@ -772,6 +772,12 @@ heap_create_with_catalog(const char *relname,
referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
/*
* For composite types, the dependency on owner is tracked for the
* pg_type entry, so don't record it here. All other relkinds need
* their ownership tracked.
*/
if (relkind != RELKIND_COMPOSITE_TYPE)
recordDependencyOnOwner(RelationRelationId, relid, ownerid);
}