summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-08-31 17:31:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-08-31 17:31:40 +0000
commit1e64862ab39b27745e31876043dc72c607a1169e (patch)
tree2fce48290645339b5f3b8cdb09e9bd722d007e07
parent780451b43d505dad91db897651ba11266f35c5a1 (diff)
downloadpostgresql-1e64862ab39b27745e31876043dc72c607a1169e.tar.gz
Clean up rather sloppy fix in HEAD for the ancient bug that CREATE CONVERSION
didn't create a dependency from the new conversion to its schema. Back-patch to all supported releases.
-rw-r--r--src/backend/catalog/pg_conversion.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/catalog/pg_conversion.c b/src/backend/catalog/pg_conversion.c
index 37b192864b..a504c9ea34 100644
--- a/src/backend/catalog/pg_conversion.c
+++ b/src/backend/catalog/pg_conversion.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28.2.2 2006/05/30 13:36:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28.2.3 2006/08/31 17:31:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,6 +18,7 @@
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/pg_conversion.h"
+#include "catalog/pg_namespace.h"
#include "catalog/pg_proc.h"
#include "catalog/namespace.h"
#include "utils/builtins.h"
@@ -120,6 +121,12 @@ ConversionCreate(const char *conname, Oid connamespace,
referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
+ /* create dependency on namespace */
+ referenced.classId = NamespaceRelationId;
+ referenced.objectId = connamespace;
+ referenced.objectSubId = 0;
+ recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
+
/* create dependency on owner */
recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
conowner);