129 else if (
strcmp(p,
"text") == 0)
131 else if (
strcmp(p,
"binary") == 0)
136 errmsg(
"unrecognized value for %s option \"%s\": \"%s\"",
150 if (
strcmp(p,
"text") == 0)
152 else if (
strcmp(p,
"xml") == 0)
154 else if (
strcmp(p,
"json") == 0)
156 else if (
strcmp(p,
"yaml") == 0)
161 errmsg(
"unrecognized value for %s option \"%s\": \"%s\"",
170 errmsg(
"unrecognized %s option \"%s\"",
179 errmsg(
"EXPLAIN option %s requires ANALYZE",
"WAL")));
191 errmsg(
"EXPLAIN option %s requires ANALYZE",
"TIMING")));
197 errmsg(
"EXPLAIN option %s requires ANALYZE",
"IO")));
203 errmsg(
"EXPLAIN option %s requires ANALYZE",
"SERIALIZE")));
209 errmsg(
"%s options %s and %s cannot be used together",
210 "EXPLAIN",
"ANALYZE",
"GENERIC_PLAN")));
217 (*explain_validate_options_hook) (es,
options, pstate);
350 exopt->guc_check_handler = guc_check_handler;
378 exopt->option_handler = handler;
379 exopt->guc_check_handler = guc_check_handler;
#define Assert(condition)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
static ExplainExtensionOption * ExplainExtensionOptionArray
ExplainState * NewExplainState(void)
static const char ** ExplainExtensionNameArray
bool GUCCheckExplainExtensionOption(const char *option_name, const char *option_value, NodeTag option_type)
static int ExplainExtensionNamesAssigned
int GetExplainExtensionId(const char *extension_name)
void * GetExplainExtensionState(ExplainState *es, int extension_id)
static int ExplainExtensionNamesAllocated
void SetExplainExtensionState(ExplainState *es, int extension_id, void *opaque)
void RegisterExtensionExplainOption(const char *option_name, ExplainOptionHandler handler, ExplainOptionGUCCheckHandler guc_check_handler)
static int ExplainExtensionOptionsAllocated
bool GUCCheckBooleanExplainOption(const char *option_name, const char *option_value, NodeTag option_type)
explain_validate_options_hook_type explain_validate_options_hook
void ParseExplainOptionList(ExplainState *es, List *options, ParseState *pstate)
bool ApplyExtensionExplainOption(ExplainState *es, DefElem *opt, ParseState *pstate)
static int ExplainExtensionOptionsAssigned
@ EXPLAIN_SERIALIZE_BINARY
void(* ExplainOptionHandler)(ExplainState *, DefElem *, ParseState *)
void(* explain_validate_options_hook_type)(ExplainState *es, List *options, ParseState *pstate)
bool(* ExplainOptionGUCCheckHandler)(const char *option_name, const char *option_value, NodeTag option_type)
#define palloc0_object(type)
void * MemoryContextAlloc(MemoryContext context, Size size)
void * repalloc(void *pointer, Size size)
void * palloc0(Size size)
MemoryContext TopMemoryContext
#define repalloc0_array(pointer, type, oldcount, count)
int parser_errposition(ParseState *pstate, int location)
static uint32 pg_nextpower2_32(uint32 num)
int pg_strcasecmp(const char *s1, const char *s2)
static enum slash_option_type option_type
StringInfo makeStringInfo(void)
ExplainOptionGUCCheckHandler guc_check_handler
ExplainOptionHandler option_handler
int extension_state_allocated
ExplainSerializeOption serialize