Re: Something seems weird inside tts_virtual_copyslot()

2023-12-07 Thread David Rowley
On Fri, 1 Dec 2023 at 14:30, David Rowley wrote: > > On Fri, 1 Dec 2023 at 13:14, Andres Freund wrote: > > So I think adding an assert to ExecCopySlot(), perhaps with a comment saying > > that the restriction could be lifted with a bit of work, would be fine. > > How about the attached? I wrote

Re: Something seems weird inside tts_virtual_copyslot()

2023-11-30 Thread David Rowley
On Fri, 1 Dec 2023 at 13:14, Andres Freund wrote: > So I think adding an assert to ExecCopySlot(), perhaps with a comment saying > that the restriction could be lifted with a bit of work, would be fine. Thanks for looking at this again. How about the attached? I wrote the comment you mentioned

Re: Something seems weird inside tts_virtual_copyslot()

2023-11-30 Thread Andres Freund
Hi, On 2023-11-06 11:16:26 +1300, David Rowley wrote: > On Sat, 4 Nov 2023 at 15:15, Andres Freund wrote: > > > > On 2023-11-01 11:35:50 +1300, David Rowley wrote: > > > I changed the Assert in tts_virtual_copyslot() to check the natts > > > match in each of the slots and all of the regression

Re: Something seems weird inside tts_virtual_copyslot()

2023-11-05 Thread David Rowley
On Sat, 4 Nov 2023 at 15:15, Andres Freund wrote: > > On 2023-11-01 11:35:50 +1300, David Rowley wrote: > > I changed the Assert in tts_virtual_copyslot() to check the natts > > match in each of the slots and all of the regression tests still pass, > > so it seems we have no tests where there's

Re: Something seems weird inside tts_virtual_copyslot()

2023-11-03 Thread Andres Freund
Hi, On 2023-11-01 11:35:50 +1300, David Rowley wrote: > Looking at the Assert inside tts_virtual_copyslot(), it does: > > Assert(srcdesc->natts <= dstslot->tts_tupleDescriptor->natts); I think that assert was intended to be the other way round. > So, that seems to indicate that it's ok for

Something seems weird inside tts_virtual_copyslot()

2023-10-31 Thread David Rowley
Looking at the Assert inside tts_virtual_copyslot(), it does: Assert(srcdesc->natts <= dstslot->tts_tupleDescriptor->natts); So, that seems to indicate that it's ok for the src slot to have fewer attributes than the destination. The code then calls tts_virtual_clear(dstslot), then