126 else if (
strcmp(p,
"text") == 0)
128 else if (
strcmp(p,
"binary") == 0)
133 errmsg(
"unrecognized value for %s option \"%s\": \"%s\"",
147 if (
strcmp(p,
"text") == 0)
149 else if (
strcmp(p,
"xml") == 0)
151 else if (
strcmp(p,
"json") == 0)
153 else if (
strcmp(p,
"yaml") == 0)
158 errmsg(
"unrecognized value for %s option \"%s\": \"%s\"",
165 errmsg(
"unrecognized %s option \"%s\"",
174 errmsg(
"EXPLAIN option %s requires ANALYZE",
"WAL")));
186 errmsg(
"EXPLAIN option %s requires ANALYZE",
"TIMING")));
192 errmsg(
"EXPLAIN option %s requires ANALYZE",
"SERIALIZE")));
198 errmsg(
"%s options %s and %s cannot be used together",
199 "EXPLAIN",
"ANALYZE",
"GENERIC_PLAN")));
206 (*explain_validate_options_hook) (es,
options, pstate);
354 exopt->option_handler = handler;
#define Assert(condition)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
static ExplainExtensionOption * ExplainExtensionOptionArray
ExplainState * NewExplainState(void)
static const char ** ExplainExtensionNameArray
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)
static int ExplainExtensionOptionsAllocated
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)
#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)
StringInfo makeStringInfo(void)
ExplainOptionHandler option_handler
int extension_state_allocated
ExplainSerializeOption serialize