Re: make tuplestore helper function - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: make tuplestore helper function
Date
Msg-id Yh8SBTuzKhq7Jwda@paquier.xyz
Whole thread Raw
In response to Re: make tuplestore helper function  (Michael Paquier <michael@paquier.xyz>)
List 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

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: more descriptive message for process termination due to max_slot_wal_keep_size
Next
From: Michael Paquier
Date:
Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set