postgresql/src/include/executor
Tom Lane 4136408902 Fix an oversight in the support for storing/retrieving "minimal tuples" in
TupleTableSlots.  We have functions for retrieving a minimal tuple from a slot
after storing a regular tuple in it, or vice versa; but these were implemented
by converting the internal storage from one format to the other.  The problem
with that is it invalidates any pass-by-reference Datums that were already
fetched from the slot, since they'll be pointing into the just-freed version
of the tuple.  The known problem cases involve fetching both a whole-row
variable and a pass-by-reference value from a slot that is fed from a
tuplestore or tuplesort object.  The added regression tests illustrate some
simple cases, but there may be other failure scenarios traceable to the same
bug.  Note that the added tests probably only fail on unpatched code if it's
built with --enable-cassert; otherwise the bug leads to fetching from freed
memory, which will not have been overwritten without additional conditions.

Fix by allowing a slot to contain both formats simultaneously; which turns out
not to complicate the logic much at all, if anything it seems less contorted
than before.

Back-patch to 8.2, where minimal tuples were introduced.
2009-03-30 04:09:18 +00:00
..
execdebug.h Remove CXT_printf/CXT1_printf macros. If anyone had found them to be of 2006-05-23 15:21:52 +00:00
execdefs.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
execdesc.h Sort reference of include files, "A" - "F". 2006-07-11 16:35:33 +00:00
executor.h Repair failure to check that a table is still compatible with a previously 2007-02-02 00:07:28 +00:00
functions.h Allow include files to compile own their own. 2006-07-13 16:49:20 +00:00
hashjoin.h More include file adjustments. 2006-07-13 18:01:02 +00:00
instrument.h Revert sampling patch for EXPLAIN ANALYZE; it turns out to be too unreliable 2006-06-09 19:30:56 +00:00
nodeAgg.h Allow include files to compile own their own. 2006-07-13 16:49:20 +00:00
nodeAppend.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeBitmapAnd.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeBitmapHeapscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeBitmapIndexscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeBitmapOr.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeFunctionscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeGroup.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeHash.h Convert hash join code to use MinimalTuple format in tuple hash table 2006-06-27 21:31:20 +00:00
nodeHashjoin.h Convert hash join code to use MinimalTuple format in tuple hash table 2006-06-27 21:31:20 +00:00
nodeIndexscan.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
nodeLimit.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeMaterial.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeMergejoin.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeNestloop.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeResult.h Repair oversight in 8.2 change that improved the handling of "pseudoconstant" 2007-02-15 03:07:21 +00:00
nodeSeqscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeSetOp.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeSort.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeSubplan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeSubqueryscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeTidscan.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeUnique.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
nodeValuesscan.h pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
spi.h Insert conditional SPI_push/SPI_pop calls into InputFunctionCall, 2009-01-07 20:39:15 +00:00
spi_priv.h Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
tstoreReceiver.h Ensure that the contents of a holdable cursor don't depend on out-of-line 2008-12-01 17:06:35 +00:00
tuptable.h Fix an oversight in the support for storing/retrieving "minimal tuples" in 2009-03-30 04:09:18 +00:00