diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-09-22 14:21:07 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-09-22 14:21:07 -0400 |
commit | 308813846e737f7d92ffb4e033d65e3df6cbddba (patch) | |
tree | 107fa2a159777a61626f744c9b458bb297bd0633 | |
parent | ee98adede535ed6bd584857d7f5095328a1ce78c (diff) | |
download | postgresql-308813846e737f7d92ffb4e033d65e3df6cbddba.tar.gz postgresql-308813846e737f7d92ffb4e033d65e3df6cbddba.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index a5cb7bba0f8..8c550f160f6 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -243,7 +243,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); |