aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/syscache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/syscache.h')
-rw-r--r--src/include/utils/syscache.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index 8a92ea27acd..8a0be41929a 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -117,6 +117,20 @@ extern void InitCatalogCachePhase2(void);
extern HeapTuple SearchSysCache(int cacheId,
Datum key1, Datum key2, Datum key3, Datum key4);
+
+/*
+ * The use of argument specific numbers is encouraged. They're faster, and
+ * insulates the caller from changes in the maximum number of keys.
+ */
+extern HeapTuple SearchSysCache1(int cacheId,
+ Datum key1);
+extern HeapTuple SearchSysCache2(int cacheId,
+ Datum key1, Datum key2);
+extern HeapTuple SearchSysCache3(int cacheId,
+ Datum key1, Datum key2, Datum key3);
+extern HeapTuple SearchSysCache4(int cacheId,
+ Datum key1, Datum key2, Datum key3, Datum key4);
+
extern void ReleaseSysCache(HeapTuple tuple);
/* convenience routines */
@@ -156,15 +170,6 @@ extern bool RelationSupportsSysCache(Oid relid);
* functions is encouraged, as it insulates the caller from changes in the
* maximum number of keys.
*/
-#define SearchSysCache1(cacheId, key1) \
- SearchSysCache(cacheId, key1, 0, 0, 0)
-#define SearchSysCache2(cacheId, key1, key2) \
- SearchSysCache(cacheId, key1, key2, 0, 0)
-#define SearchSysCache3(cacheId, key1, key2, key3) \
- SearchSysCache(cacheId, key1, key2, key3, 0)
-#define SearchSysCache4(cacheId, key1, key2, key3, key4) \
- SearchSysCache(cacheId, key1, key2, key3, key4)
-
#define SearchSysCacheCopy1(cacheId, key1) \
SearchSysCacheCopy(cacheId, key1, 0, 0, 0)
#define SearchSysCacheCopy2(cacheId, key1, key2) \