Currently we don't record any dependencies between namespaces and conversions. This looks inconsistent to me, since we have dependencies on all other objects that live
within namespaces. Please find attached a small patch that fixes this issue.


--
 Thanks

                   Bernd
Index: src/backend/catalog/pg_conversion.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/catalog/pg_conversion.c,v
retrieving revision 1.29
diff -c -r1.29 pg_conversion.c
*** src/backend/catalog/pg_conversion.c 5 Mar 2006 15:58:23 -0000       1.29
--- src/backend/catalog/pg_conversion.c 19 May 2006 13:40:40 -0000
***************
*** 18,23 ****
--- 18,24 ----
  #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"
***************
*** 124,129 ****
--- 125,136 ----
        recordDependencyOnOwner(ConversionRelationId, HeapTupleGetOid(tup),
                                                        conowner);
  
+       /* create dependency on namespace */
+       myself.classId = ConversionRelationId;
+       referenced.classId = NamespaceRelationId;
+       referenced.objectId = connamespace;
+       recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
+ 
        heap_freetuple(tup);
        heap_close(rel, RowExclusiveLock);
  
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to