>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:

 [snip]

The commit for this said:

    With this change, there is no reason for anybody to call
    AllocSetContextCreateExtended directly, so in HEAD I renamed it to

except there IS such a reason: if you need (as I do in pl/lua) to wrap
the call in a catch block, inside a function which takes the name and so
on as a parameter, then you have no option but to do so (since using the
macro errors out on the non-const parameter).

Right now I'm stuck with this:

    PLLUA_TRY();
    {
#if PG_VERSION_NUM >= 120000
        mcxt = AllocSetContextCreateInternal(parent, name, minsz, initsz, 
maxsz);
#elif PG_VERSION_NUM >= 110000
        mcxt = AllocSetContextCreateExtended(parent, name, minsz, initsz, 
maxsz);
#else
        mcxt = AllocSetContextCreate(parent, name, minsz, initsz, maxsz);
#endif
        *p = mcxt;
    }
    PLLUA_CATCH_RETHROW();

which kind of sucks. At least let's revert the pointless name change.

-- 
Andrew (irc:RhodiumToad)

Reply via email to