Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()
Дата
Msg-id CAJ7c6TOg==suNRgtPFKPxp-Uau5R3OW0QCXS_XCxjVkrrBuz2g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()  (Michael Paquier <michael@paquier.xyz>)
Re: Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
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 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
MakeSingleTupleTableSlot is used 41 times across 26 files. Thus the
proposed patch removes MakeTupleTableSlot and keeps
MakeSingleTupleTableSlot to keep the patch less invasive and simplify
backporting of the other patches. Hopefully, this will not complicate
the life of the extension developers too much.

The patch was tested on MacOS against `master` branch b1ce6c28.

[1]: https://www.postgresql.org/message-id/flat/CAJ7c6TP0AowkUgNL6zcAK-s5HYsVHVBRWfu69FRubPpfwZGM9A%40mail.gmail.com

-- 
Best regards,
Aleksander Alekseev

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Fix memory corruption in pg_shdepend.c
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [PATCH] Fix memory corruption in pg_shdepend.c