summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorTom Lane2017-03-26 23:14:47 +0000
committerTom Lane2017-03-26 23:14:57 +0000
commit2f0903ea196503fc8af373a9de46b1e01a23508c (patch)
tree9eceb4a64d9f6585508fcb2a2c003110cf040cc2 /src/include/access
parent895f93701fd78b6faab6b437685357298a91dfe3 (diff)
Improve performance of ExecEvalWholeRowVar.
In commit b8d7f053c, we needed to fix ExecEvalWholeRowVar to not change the state of the slot it's copying. The initial quick hack at that required two rounds of tuple construction, which is not very nice. To fix, add another primitive to tuptoaster.c that does precisely what we need. (I initially tried to do this by refactoring one of the existing functions into two pieces; but it looked like that might hurt performance for the existing case, and the amount of code that could be shared is not very large, so I gave up on that.) Discussion: https://postgr.es/m/26088.1490315792@sss.pgh.pa.us
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/tuptoaster.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/access/tuptoaster.h b/src/include/access/tuptoaster.h
index a6233c386d..c7abeed812 100644
--- a/src/include/access/tuptoaster.h
+++ b/src/include/access/tuptoaster.h
@@ -194,6 +194,17 @@ extern Datum toast_flatten_tuple_to_datum(HeapTupleHeader tup,
TupleDesc tupleDesc);
/* ----------
+ * toast_build_flattened_tuple -
+ *
+ * Build a tuple containing no out-of-line toasted fields.
+ * (This does not eliminate compressed or short-header datums.)
+ * ----------
+ */
+extern HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc,
+ Datum *values,
+ bool *isnull);
+
+/* ----------
* toast_compress_datum -
*
* Create a compressed version of a varlena datum, if possible