Re: New "single-call SRF" APIs are very confusingly named

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: New "single-call SRF" APIs are very confusingly named
Date: 2022-10-14 01:34:26
Message-ID: 20221014013426.2cgcnb72uyolu3ax@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-10-14 10:28:34 +0900, Michael Paquier wrote:
> On Thu, Oct 13, 2022 at 12:48:20PM -0700, Andres Freund wrote:
> > Maybe something like InitMaterializedSRF() w/
> > MAT_SRF_(USE_EXPECTED_DESC|BLESS)
>
> Or just SetMaterializedFuncCall()?

I think starting any function that's not a setter with Set* is very likely to
be misunderstood (SetReturning* is clearer, but long). This just reads like
you're setting the materialized function call on something.

> Do we always have to mention the SRF part of it once we tell about the
> materialization part?

Yes. The SRF is the important part.

> The latter sort implies the former once a function returns multiple tuples.

There's lot of other other things that can be materialized.

> I don't mind doing some renaming of all that even post-release, though
> comes the question of keeping some compabitility macros for
> compilation in case one uses these routines?

Agreed that we'd need compat. I think it'd need to be compatibility function,
not just renaming via macro, so we keep ABI compatibility.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-10-14 01:39:23 Re: Incorrect comment regarding command completion tags
Previous Message Michael Paquier 2022-10-14 01:28:34 Re: New "single-call SRF" APIs are very confusingly named