On Tue, Jun 16, 2026 at 3:11 PM Corey Huinker <[email protected]> wrote:
> Obviously, even that wouldn't get us to the no-FunctionCallInfo-at-all goal, 
> but it would get us out of the SPI situation. If we did have a non-fcinfo 
> function API, that API would either have to pass char *params almost 
> exclusively, or else each caller would have to do the translation or 
> float-array strings to double[] and such, which would be a lot of work for 
> the caller.
>
> Would you be ok with a function like attribute_statistics_update, but purely 
> with cstring args? Obviously the callers would have to modify their calls 
> each time a new stat param is added, but that is seemingly preferable for you 
> than the current situation.

I feel pretty strongly that we want a way to identify the relation by
OID rather than by schema and name. I'm not sure whether attributes
should be identified by name or by number in this context. Apart from
those things, if passing strings and leaving it up to the called
function to interpret them makes most sense, that's OK with me.

I agree with you that getting rid of SPI is a much higher priority
than getting rid of the FunctionCallInfo stuff altogether. I could
live with DirectFunctionCall if we don't have a better option. I'm a
bit suspicious that this will lead to code bloat in postgres_fdw or
elsewhere, but maybe not.

-- 
Robert Haas
EDB: http://www.enterprisedb.com


Reply via email to