greenplumn gp_optimizer_functions 源码
greenplumn gp_optimizer_functions 代码
文件路径:/src/backend/utils/adt/gp_optimizer_functions.c
/*
* gp_optimizer_functions.c
* Defines builtin transformation functions for the optimizer.
*
* enable_xform: This function wraps EnableXform.
*
* disable_xform: This function wraps DisableXform.
*
* gp_opt_version: This function wraps LibraryVersion.
*
* Copyright(c) 2012 - present, EMC/Greenplum
*/
#include "postgres.h"
#include "funcapi.h"
#include "utils/builtins.h"
extern Datum EnableXform(PG_FUNCTION_ARGS);
/*
* Enables transformations in the optimizer.
*/
Datum
enable_xform(PG_FUNCTION_ARGS)
{
#ifdef USE_ORCA
return EnableXform(fcinfo);
#else
return CStringGetTextDatum("Server has been compiled without ORCA");
#endif
}
extern Datum DisableXform(PG_FUNCTION_ARGS);
/*
* Disables transformations in the optimizer.
*/
Datum
disable_xform(PG_FUNCTION_ARGS)
{
#ifdef USE_ORCA
return DisableXform(fcinfo);
#else
return CStringGetTextDatum("Server has been compiled without ORCA");
#endif
}
extern Datum LibraryVersion();
/*
* Returns the optimizer and gpos library versions.
*/
Datum
gp_opt_version(PG_FUNCTION_ARGS pg_attribute_unused())
{
#ifdef USE_ORCA
return LibraryVersion();
#else
return CStringGetTextDatum("Server has been compiled without ORCA");
#endif
}
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦