aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/setrefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/plan/setrefs.c')
-rw-r--r--src/backend/optimizer/plan/setrefs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c
index 66d21b2b2c3..e1b48fb4f53 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -15,7 +15,6 @@
*/
#include "postgres.h"
-#include "access/hash.h"
#include "access/transam.h"
#include "catalog/pg_type.h"
#include "nodes/makefuncs.h"
@@ -1830,14 +1829,11 @@ record_plan_function_dependency(PlannerInfo *root, Oid funcid)
/*
* It would work to use any syscache on pg_proc, but the easiest is
* PROCOID since we already have the function's OID at hand. Note
- * that plancache.c knows we use PROCOID. Also, we're perhaps
- * assuming more than we should about how CatalogCacheComputeHashValue
- * computes hash values...
+ * that plancache.c knows we use PROCOID.
*/
inval_item->cacheId = PROCOID;
- inval_item->hashValue =
- DatumGetUInt32(DirectFunctionCall1(hashoid,
- ObjectIdGetDatum(funcid)));
+ inval_item->hashValue = GetSysCacheHashValue1(PROCOID,
+ ObjectIdGetDatum(funcid));
root->glob->invalItems = lappend(root->glob->invalItems, inval_item);
}