1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Revise the way the element allocator for a simplehash is specified.

This method is more elegant and more efficient.

Per a suggestion from Andres Freund, who also briefly reviewed
the patch.
This commit is contained in:
Robert Haas
2017-02-07 17:01:40 -05:00
parent 242066cc8e
commit c3c4f6e174
3 changed files with 25 additions and 47 deletions

View File

@ -330,8 +330,7 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx,
else
hashtable->hash_iv = 0;
hashtable->hashtab =
tuplehash_create(tablecxt, nbuckets, NULL, NULL, NULL);
hashtable->hashtab = tuplehash_create(tablecxt, nbuckets);
hashtable->hashtab->private_data = hashtable;
return hashtable;