From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 30 Aug 2005 01:08:47 +0000 (+0000)
Subject: DropTableSpace forgot to remove dependency on tablespace's owner.
X-Git-Tag: REL8_1_0BETA2~74
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13065c7174ea6e60bbf619f21b0fa382718acaf0;p=postgresql

DropTableSpace forgot to remove dependency on tablespace's owner.
Per report from Jaime Casanova.
---

diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 06c939c2d5..4bf2a4777f 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.26 2005/07/14 21:46:29 tgl Exp $
+ *	  $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.27 2005/08/30 01:08:47 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -446,6 +446,11 @@ DropTableSpace(DropTableSpaceStmt *stmt)
 
 	heap_endscan(scandesc);
 
+	/*
+	 * Remove dependency on owner.
+	 */
+	deleteSharedDependencyRecordsFor(TableSpaceRelationId, tablespaceoid);
+
 	/*
 	 * Try to remove the physical infrastructure
 	 */