summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2006-10-06 18:23:48 +0000
committerTom Lane2006-10-06 18:23:48 +0000
commitd2cc024be10c85eca94688af863b21b54eacd690 (patch)
tree953f49c98bdce9d01e89ee74132359156bb5a6b6 /src/include
parent4d3760f6745b45f70b1699399f14041e56b71b4a (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')
-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 f08212d3f38..21c1e1b8c66 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.52 2004/12/31 22:03:45 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.52.4.1 2006/10/06 18:23:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,7 +167,7 @@ extern void AtEOXact_CatCache(bool isCommit);
extern CatCache *InitCatCache(int id, const char *relname, const char *indname,
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,