Re: AllocSetContextCreate changes breake extensions
От
Tom Lane
Тема
Re: AllocSetContextCreate changes breake extensions
Дата
Msg-id
23351.1539366713@sss.pgh.pa.us
Ответ на
Re: AllocSetContextCreate changes breake extensions (Andres Freund)
Список
Дерево обсуждения
AllocSetContextCreate changes breake extensions Andres Freund <andres@anarazel.de>
Re: AllocSetContextCreate changes breake extensions Tom Lane <tgl@sss.pgh.pa.us>
Re: AllocSetContextCreate changes breake extensions Andres Freund <andres@anarazel.de>
Re: AllocSetContextCreate changes breake extensions Tom Lane <tgl@sss.pgh.pa.us>
Re: AllocSetContextCreate changes breake extensions Andres Freund <andres@anarazel.de>
Re: AllocSetContextCreate changes breake extensions Tom Lane <tgl@sss.pgh.pa.us>
Re: AllocSetContextCreate changes breake extensions Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: AllocSetContextCreate changes breake extensions Tom Lane <tgl@sss.pgh.pa.us>
Re: AllocSetContextCreate changes breake extensions Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: AllocSetContextCreate changes breake extensions Christoph Berg <myon@debian.org>
Re: AllocSetContextCreate changes breake extensions Chapman Flack <chap@anastigmatix.net>
Andres Freund writes: > But can't we just do something like: > #if defined(HAVE__BUILTIN_CONSTANT_P) && defined(HAVE__VA_ARGS) > #define AllocSetContextCreate(parent, name, ...) \ > (StaticAssertExpr(__builtin_constant_p(name), \ > "memory context names must be constant strings"), \ > AllocSetContextCreateExtended(parent, name, __VA_ARGS__)) > #else > #define AllocSetContextCreate \ > AllocSetContextCreateExtended > #endif > The set of compilers that have __builtin_constant_p and not vararg > macros got to be about empty. Yeah, fair point, and anyway we don't need the StaticAssert to exist everywhere. I'll make it so. Shall we also backpatch the ALLOCSET_*_SIZES macros as Christoph suggested? I'm not convinced of the usefulness of that, since extensions would still have to cope with them not being present when building against existing minor releases. regards, tom lane
В списке pgsql-hackers по дате отправления