aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/executor.h
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2025-01-10 17:14:37 -0800
committerJeff Davis <jdavis@postgresql.org>2025-01-10 17:14:37 -0800
commite0ece2a981ee9068f50c4423e303836c2585eb02 (patch)
treeb5a61a16ff16405c3c3bcbb4f44089648e166d12 /src/include/executor/executor.h
parent34c6e652425fde42c2746f749e31d196fc0d5538 (diff)
downloadpostgresql-e0ece2a981ee9068f50c4423e303836c2585eb02.tar.gz
postgresql-e0ece2a981ee9068f50c4423e303836c2585eb02.zip
TupleHashTable: store additional data along with tuple.
Previously, the caller needed to allocate the memory and the TupleHashTable would store a pointer to it. That wastes space for the palloc overhead as well as the size of the pointer itself. Now, the TupleHashTable relies on the caller to correctly specify the additionalsize, and allocates that amount of space. The caller can then request a pointer into that space. Discussion: https://postgr.es/m/b9cbf0219a9859dc8d240311643ff4362fd9602c.camel@j-davis.com Reviewed-by: Heikki Linnakangas
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r--src/include/executor/executor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index f8a8d03e533..a49c32072e3 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -148,9 +148,12 @@ extern TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable,
bool *isnew, uint32 *hash);
extern uint32 TupleHashTableHash(TupleHashTable hashtable,
TupleTableSlot *slot);
+extern size_t TupleHashEntrySize(void);
extern TupleHashEntry LookupTupleHashEntryHash(TupleHashTable hashtable,
TupleTableSlot *slot,
bool *isnew, uint32 hash);
+extern MinimalTuple TupleHashEntryGetTuple(TupleHashEntry entry);
+extern void *TupleHashEntryGetAdditional(TupleHashEntry entry);
extern TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable,
TupleTableSlot *slot,
ExprState *eqcomp,