Fix comments in execTuples.c
Hi hackers,
```
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index 8e02d68824f..b77e9513e7e 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1532,9 +1532,6 @@ ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */
* and let the upper-level table slot assume ownership of the copy!
*
* Return value is just the passed-in slot pointer.
- *
- * If the target slot is not guaranteed to be TTSOpsHeapTuple type slot, use
- * the, more expensive, ExecForceStoreHeapTuple().
* --------------------------------
*/
TupleTableSlot *
@@ -1572,9 +1569,6 @@ ExecStoreHeapTuple(HeapTuple tuple,
* slot is cleared, so that the tuple won't go away on us.
*
* Return value is just the passed-in slot pointer.
- *
- * If the target slot is not guaranteed to be TTSOpsBufferHeapTuple type slot,
- * use the, more expensive, ExecForceStoreHeapTuple().
* --------------------------------
*/
TupleTableSlot *
@@ -1627,9 +1621,6 @@ ExecStorePinnedBufferHeapTuple(HeapTuple tuple,
/*
* Store a minimal tuple into TTSOpsMinimalTuple type slot.
- *
- * If the target slot is not guaranteed to be TTSOpsMinimalTuple type slot,
- * use the, more expensive, ExecForceStoreMinimalTuple().
*/
TupleTableSlot *
ExecStoreMinimalTuple(MinimalTuple mtup,
```
All of these are reporting an error rather than using ExecForceStore*(), so I just remove these comments.
Thoughts?
--
Regards,
ChangAo Chen
Attachments:
v1-0001-Fix-comments-in-execTuples.c.patchapplication/octet-stream; charset=utf-8; name=v1-0001-Fix-comments-in-execTuples.c.patchDownload
From b18999fa5f2ed11e7b304fd30bedbec4bfe68f6c Mon Sep 17 00:00:00 2001
From: ChangAo Chen <cca5507@qq.com>
Date: Fri, 28 Nov 2025 20:18:22 +0800
Subject: [PATCH v1] Fix comments in execTuples.c
---
src/backend/executor/execTuples.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index 8e02d68824f..b77e9513e7e 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1532,9 +1532,6 @@ ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */
* and let the upper-level table slot assume ownership of the copy!
*
* Return value is just the passed-in slot pointer.
- *
- * If the target slot is not guaranteed to be TTSOpsHeapTuple type slot, use
- * the, more expensive, ExecForceStoreHeapTuple().
* --------------------------------
*/
TupleTableSlot *
@@ -1572,9 +1569,6 @@ ExecStoreHeapTuple(HeapTuple tuple,
* slot is cleared, so that the tuple won't go away on us.
*
* Return value is just the passed-in slot pointer.
- *
- * If the target slot is not guaranteed to be TTSOpsBufferHeapTuple type slot,
- * use the, more expensive, ExecForceStoreHeapTuple().
* --------------------------------
*/
TupleTableSlot *
@@ -1627,9 +1621,6 @@ ExecStorePinnedBufferHeapTuple(HeapTuple tuple,
/*
* Store a minimal tuple into TTSOpsMinimalTuple type slot.
- *
- * If the target slot is not guaranteed to be TTSOpsMinimalTuple type slot,
- * use the, more expensive, ExecForceStoreMinimalTuple().
*/
TupleTableSlot *
ExecStoreMinimalTuple(MinimalTuple mtup,
--
2.52.0
On Fri, Nov 28, 2025 at 6:03 PM cca5507 <cca5507@qq.com> wrote:
Hi hackers,
``` diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 8e02d68824f..b77e9513e7e 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -1532,9 +1532,6 @@ ExecSetSlotDescriptor(TupleTableSlot *slot, /* slot to change */ * and let the upper-level table slot assume ownership of the copy! * * Return value is just the passed-in slot pointer. - * - * If the target slot is not guaranteed to be TTSOpsHeapTuple type slot, use - * the, more expensive, ExecForceStoreHeapTuple(). * -------------------------------- */ TupleTableSlot * @@ -1572,9 +1569,6 @@ ExecStoreHeapTuple(HeapTuple tuple, * slot is cleared, so that the tuple won't go away on us. * * Return value is just the passed-in slot pointer. - * - * If the target slot is not guaranteed to be TTSOpsBufferHeapTuple type slot, - * use the, more expensive, ExecForceStoreHeapTuple(). * -------------------------------- */ TupleTableSlot * @@ -1627,9 +1621,6 @@ ExecStorePinnedBufferHeapTuple(HeapTuple tuple,/*
* Store a minimal tuple into TTSOpsMinimalTuple type slot.
- *
- * If the target slot is not guaranteed to be TTSOpsMinimalTuple type slot,
- * use the, more expensive, ExecForceStoreMinimalTuple().
*/
TupleTableSlot *
ExecStoreMinimalTuple(MinimalTuple mtup,
```All of these are reporting an error rather than using ExecForceStore*(), so I just remove these comments.
Thoughts?
Hi ChangAo,
Those lines in the comment advise the caller. We need them there. They
do not describe the behaviour of the function, at least directly, as
you seem to be assuming.
See comment in store_returning_result() for example.
--
Best Wishes,
Ashutosh Bapat
Hi Ashutosh,
Those lines in the comment advise the caller. We need them there. They
do not describe the behaviour of the function, at least directly, as
you seem to be assuming.See comment in store_returning_result() for example.
Oh yeah, you are right. Thank you for pointing it out!
--
Regards,
ChangAo Chen