summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/access/hash/hashfunc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/access/hash/hashfunc.c b/src/backend/access/hash/hashfunc.c
index 9827de1567..e2e60a4251 100644
--- a/src/backend/access/hash/hashfunc.c
+++ b/src/backend/access/hash/hashfunc.c
@@ -560,7 +560,9 @@ compute_hash(Oid type, Datum value, int *pErr, char locator)
* a = 8446744073709551359
* and a = 8446744073709551359::int8 both work*/
tmp64 = DatumGetInt64(value);
- return DirectFunctionCall1(hashint8, tmp64);
+ if (locator == LOCATOR_TYPE_HASH)
+ return DirectFunctionCall1(hashint8, value);
+ return tmp64;
case INT2OID:
tmp16 = DatumGetInt16(value);
if (locator == LOCATOR_TYPE_HASH)