summaryrefslogtreecommitdiff
path: root/src/include/utils/catcache.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-10-06 18:23:41 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-10-06 18:23:41 +0000
commita222a158b08205e89a5e291763c854277906fc8c (patch)
treed276cba652f98fd08ff7c1af0578ddeee3c39807 /src/include/utils/catcache.h
parent4af74cc00751d250d6f3c7b6f28b6f7daae07e1d (diff)
Fix SysCacheGetAttr() to handle the case where the specified syscache has not
been initialized yet. This can happen because there are code paths that call SysCacheGetAttr() on a tuple originally fetched from a different syscache (hopefully on the same catalog) than the one specified in the call. It doesn't seem useful or robust to try to prevent that from happening, so just improve the function to cope instead. Per bug#2678 from Jeff Trout. The specific example shown by Jeff is new in 8.1, but to be on the safe side I'm backpatching 8.0 as well. We could patch 7.x similarly but I think that's probably overkill, given the lack of evidence of old bugs of this ilk.
Diffstat (limited to 'src/include/utils/catcache.h')
-rw-r--r--src/include/utils/catcache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index 214b2df468e..7ec9376b8c0 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.56.2.1 2005/11/22 18:23:29 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.56.2.2 2006/10/06 18:23:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -170,7 +170,7 @@ extern void AtEOXact_CatCache(bool isCommit);
extern CatCache *InitCatCache(int id, Oid reloid, Oid indexoid,
int reloidattr,
int nkeys, const int *key);
-extern void InitCatCachePhase2(CatCache *cache);
+extern void InitCatCachePhase2(CatCache *cache, bool touch_index);
extern HeapTuple SearchCatCache(CatCache *cache,
Datum v1, Datum v2,