aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-02-09 14:59:57 -0500
committerRobert Haas <rhaas@postgresql.org>2017-02-09 14:59:57 -0500
commit72257f95781af97108fa9a9e7224ec81a90e7693 (patch)
treee221630989e7de61b58a27b4f9ac39128118f4cb /src/backend/executor
parent3f3d60d3bbd10f6cc118d24aadc60e96b9854576 (diff)
downloadpostgresql-72257f95781af97108fa9a9e7224ec81a90e7693.tar.gz
postgresql-72257f95781af97108fa9a9e7224ec81a90e7693.zip
simplehash: Additional tweaks to make specifying an allocator work.
Even if we don't emit definitions for SH_ALLOCATE and SH_FREE, we still need prototypes. The user can't define them before including simplehash.h because SH_TYPE isn't available yet. For the allocator to be able to access private_data, it needs to become an argument to SH_CREATE. Previously we relied on callers to set that after returning from SH_CREATE, but SH_CREATE calls SH_ALLOCATE before returning. Dilip Kumar, reviewed by me.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execGrouping.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 47c9656e1be..4b1f634e211 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -330,8 +330,7 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx,
else
hashtable->hash_iv = 0;
- hashtable->hashtab = tuplehash_create(tablecxt, nbuckets);
- hashtable->hashtab->private_data = hashtable;
+ hashtable->hashtab = tuplehash_create(tablecxt, nbuckets, hashtable);
return hashtable;
}