aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2006-04-24 01:40:39 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2006-04-24 01:40:39 +0000
commit7f0c9716ba3bc58ba02b57d6596605b570cd22bd (patch)
tree00d949acd86a661848041c11e5e6bb5b15b7cc70
parent21138b5e595a149aef973c3d275fd291b043b887 (diff)
downloadpostgresql-7f0c9716ba3bc58ba02b57d6596605b570cd22bd.tar.gz
postgresql-7f0c9716ba3bc58ba02b57d6596605b570cd22bd.zip
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.
-rw-r--r--src/backend/catalog/heap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index 6213fe9faa2..71e0f9d3962 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.292.2.1 2005/11/22 18:23:06 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.292.2.2 2006/04/24 01:40:39 alvherre Exp $
*
*
* INTERFACE ROUTINES
@@ -772,7 +772,13 @@ heap_create_with_catalog(const char *relname,
referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
- recordDependencyOnOwner(RelationRelationId, relid, ownerid);
+ /*
+ * 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);
}
/*