Re: [PATCHES] Add namespace dependency for conversions

2006-05-30 Thread Bruce Momjian

Patch applied.  Thanks.

---


Bernd Helmle wrote:
 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

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 2: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[PATCHES] Add namespace dependency for conversions

2006-05-19 Thread Bernd Helmle
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

   BerndIndex: 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 -   1.29
--- src/backend/catalog/pg_conversion.c 19 May 2006 13:40:40 -
***
*** 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