aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-09-22 14:21:07 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-09-22 14:21:07 -0400
commit0a2f894c3c88e4693d7cd36cba1b136474c7ff89 (patch)
treea42a6700dd499986fbd415b4bd35b79c6ffab4f3
parent51004c7172b5c35afac050f4d5849839a06e8d3b (diff)
downloadpostgresql-0a2f894c3c88e4693d7cd36cba1b136474c7ff89.tar.gz
postgresql-0a2f894c3c88e4693d7cd36cba1b136474c7ff89.zip
Fix typo in tts_virtual_copyslot.
The code used the destination slot's natts where it intended to use the source slot's natts. Adding an Assert shows that there is no case in "make check-world" where these counts are different, so maybe this is a harmless bug, but it's still a bug. Takayuki Tsunakawa Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1FD34C0E@G01JPEXMBYT05
-rw-r--r--src/backend/executor/execTuples.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index 5900d967a2d..87bc510b31b 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -244,7 +244,7 @@ tts_virtual_materialize(TupleTableSlot *slot)
static void
tts_virtual_copyslot(TupleTableSlot *dstslot, TupleTableSlot *srcslot)
{
- TupleDesc srcdesc = dstslot->tts_tupleDescriptor;
+ TupleDesc srcdesc = srcslot->tts_tupleDescriptor;
Assert(srcdesc->natts <= dstslot->tts_tupleDescriptor->natts);