Re: make tuplestore helper function

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: make tuplestore helper function
Date: 2022-03-02 06:43:17
Message-ID: Yh8SBTuzKhq7Jwda@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 28, 2022 at 04:49:41PM +0900, Michael Paquier wrote:
> In order to keep things pluggable at will, MakeFuncResultTuplestore()
> has been changed to access a set of bits32 flags, able to control the
> two options above. With this facility in place, I have been able to
> cut much more code than the initial patch, roughly twice as of:
> 24 files changed, 157 insertions(+), 893 deletions(-)

So, I have been thinking about this patch once again, and after
pondering more on it, MakeFuncResultTuplestore() is actually a wrong
name now that it does much more than just creating a tuplestore, by
assigning the TupleDesc and the TupleStore into the function's
ReturnSetInfo.

This is actually setting up a function in the context of a single call
where we fill the tuplestore with all its values, so instead I have
settled down to name that SetSingleFuncCall(), to make a parallel with
the existing MultiFuncCall*(). funcapi.c is the right place for
that, and I have added more documentation in the fmgr's README as well
as funcapi.h.
--
Michael

Attachment Content-Type Size
v10-0001-Introduce-MakeFuncResultTuplestore.patch text/x-diff 45.2 KB
v10-0002-Introduce-more-simplifications-using-SetSingleFu.patch text/x-diff 50.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-02 06:57:23 Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Previous Message Kyotaro Horiguchi 2022-03-02 06:37:19 Re: more descriptive message for process termination due to max_slot_wal_keep_size