Re: AllocSetContextCreate changes breake extensions
| От | Andrew Gierth |
|---|---|
| Тема | Re: AllocSetContextCreate changes breake extensions |
| Дата | |
| Msg-id | 87r2f04ggf.fsf@news-spur.riddles.org.uk обсуждение исходный текст |
| Ответ на | Re: AllocSetContextCreate changes breake extensions (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: AllocSetContextCreate changes breake extensions
|
| Список | pgsql-hackers |
>>>>> "Tom" == Tom Lane <tgl@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)
В списке pgsql-hackers по дате отправления: