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

Fix outdated comments regarding TupleTableSlots

The tts_flag is named TTS_FLAG_SHOULDFREE, so use that instead of
TTS_SHOULDFREE, which is the name of the macro that checks for that flag.

Additionally, 4da597edf got rid of the TupleTableSlot.tts_tuple field but
forgot to update a comment which referenced that field.  Fix that.

Reported-by: Zhen Mingyang <zhenmingyang@yeah.net>
Reported-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/1a96696c.9d3.187193989c3.Coremail.zhenmingyang@yeah.net
This commit is contained in:
David Rowley
2023-03-30 16:37:03 +13:00
parent 7f5b19817e
commit 902ecd3bd4
2 changed files with 10 additions and 9 deletions

View File

@@ -385,8 +385,8 @@ tts_heap_materialize(TupleTableSlot *slot)
{
/*
* The tuple contained in this slot is not allocated in the memory
* context of the given slot (else it would have TTS_SHOULDFREE set).
* Copy the tuple into the given slot's memory context.
* context of the given slot (else it would have TTS_FLAG_SHOULDFREE
* set). Copy the tuple into the given slot's memory context.
*/
hslot->tuple = heap_copytuple(hslot->tuple);
}
@@ -554,8 +554,9 @@ tts_minimal_materialize(TupleTableSlot *slot)
{
/*
* The minimal tuple contained in this slot is not allocated in the
* memory context of the given slot (else it would have TTS_SHOULDFREE
* set). Copy the minimal tuple into the given slot's memory context.
* memory context of the given slot (else it would have
* TTS_FLAG_SHOULDFREE set). Copy the minimal tuple into the given
* slot's memory context.
*/
mslot->mintuple = heap_copy_minimal_tuple(mslot->mintuple);
}