aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/catcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/cache/catcache.c')
-rw-r--r--src/backend/utils/cache/catcache.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index 8a0a42ce712..5ddbf6eab10 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1512,6 +1512,11 @@ GetCatCacheHashValue(CatCache *cache,
* Generate a list of all tuples matching a partial key (that is,
* a key specifying just the first K of the cache's N key columns).
*
+ * It doesn't make any sense to specify all of the cache's key columns
+ * here: since the key is unique, there could be at most one match, so
+ * you ought to use SearchCatCache() instead. Hence this function takes
+ * one less Datum argument than SearchCatCache() does.
+ *
* The caller must not modify the list object or the pointed-to tuples,
* and must call ReleaseCatCacheList() when done with the list.
*/
@@ -1520,9 +1525,9 @@ SearchCatCacheList(CatCache *cache,
int nkeys,
Datum v1,
Datum v2,
- Datum v3,
- Datum v4)
+ Datum v3)
{
+ Datum v4 = 0; /* dummy last-column value */
Datum arguments[CATCACHE_MAXKEYS];
uint32 lHashValue;
dlist_iter iter;