FONTEND宏主要用于标记某些可能会在libpq客户端使用的场景,虽然他们主要用于服务端。如下:
/*
* Although this header file is nominally backend-only, certain frontend
* programs like pg_controldata include it via postgres.h. For some compilers
* it's necessary to hide the inline definition of MemoryContextSwitchTo in
* this scenario; hence the #ifndef FRONTEND.
*/
#ifndef FRONTEND
static inline MemoryContext
MemoryContextSwitchTo(MemoryContext context)
{
MemoryContext old = CurrentMemoryContext;
CurrentMemoryContext = context;
return old;
}
#endif /* FRONTEND */
并且看起来,主要用于windows下为主。
LightDB Enterprise Postgres--金融级关系型数据库,更快、更稳、更懂金融!