Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-26 Thread Alvaro Herrera
On 2021-Oct-26, Robert Haas wrote: > On Tue, Oct 26, 2021 at 7:54 AM Alvaro Herrera > wrote: > > Another point that could be made is that perhaps > > MakeSingleTupleTableSlot should always construct a slot using virtual > > tuples rather than passing TTSOps as a parameter? > > I haven't really

Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-26 Thread Robert Haas
On Tue, Oct 26, 2021 at 7:54 AM Alvaro Herrera wrote: > Another point that could be made is that perhaps > MakeSingleTupleTableSlot should always construct a slot using virtual > tuples rather than passing TTSOps as a parameter? I haven't really looked at this issue deeply but that seems like it

Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-26 Thread Alvaro Herrera
On 2021-Oct-26, Aleksander Alekseev wrote: > > In short: I'm not okay with doing > > s/MakeTupleTableSlot/MakeSingleTupleTableSlot/g in a patch that doesn't > > also introduce matching ExecDropSingleTupleTableSlot calls (unless those > > exist somewhere already; but where?). If we did clean that u

Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-26 Thread Aleksander Alekseev
Hi Alvaro, > Did you see the arguments at [1]? > > [1] https://www.postgresql.org/message-id/1632520.1613195514%40sss.pgh.pa.us No, I missed it. Thanks for sharing. > If you dig in the git history (see f92e8a4b5 in particular) you'll note > that the current version of MakeTupleTableSlot originat

Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-25 Thread Alvaro Herrera
On 2021-Oct-22, Aleksander Alekseev wrote: > Hi hackers, > > During the discussion [1] it was discovered that we have two > procedures in execTuples.c that do the same thing: > > * MakeSingleTupleTableSlot() > * MakeTupleTableSlot() > > In fact, MakeSingleTupleTableSlot() is simply a wrapper fo

Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-23 Thread Michael Paquier
On Fri, Oct 22, 2021 at 04:39:37PM +0300, Aleksander Alekseev wrote: > I propose keeping only one of these procedures to simplify navigating > through the code and debugging, and maybe saving a CPU cycle or two. A > search for MakeTupleTableSlot produced 8 matches across 2 files, while > MakeSingle

Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

2021-10-22 Thread Aleksander Alekseev
Hi hackers, During the discussion [1] it was discovered that we have two procedures in execTuples.c that do the same thing: * MakeSingleTupleTableSlot() * MakeTupleTableSlot() In fact, MakeSingleTupleTableSlot() is simply a wrapper for MakeTupleTableSlot(). I propose keeping only one of these p