25 .
name =
"pg_overexplain",
42 const char *plan_name,
47 const char *queryString,
144 (*prev_explain_per_node_hook) (planstate, ancestors,
relationship,
270 if (n->plan_node_id !=
plan->plan_node_id)
279 switch (n->elided_type)
315 const char *queryString,
322 (*prev_explain_per_plan_hook) (plannedstmt, into, es, queryString,
347 char *commandType =
NULL;
363 commandType =
"unknown";
366 commandType =
"select";
369 commandType =
"update";
372 commandType =
"insert";
375 commandType =
"delete";
378 commandType =
"merge";
381 commandType =
"utility";
384 commandType =
"nothing";
421 else if (plannedstmt->
stmt_len == 0)
476 switch (
rte->rtekind)
500 kind =
"namedtuplestore";
522 rte->inh ?
", inherited" :
"",
523 rte->inFromCl ?
", in-from-clause" :
"");
589 switch (
rte->relkind)
592 relkind =
"relation";
598 relkind =
"sequence";
601 relkind =
"toastvalue";
610 relkind =
"composite_type";
613 relkind =
"foreign_table";
616 relkind =
"partitioned_table";
619 relkind =
"partitioned_index";
634 if (
rte->rellockmode != 0)
637 rte->rellockmode), es);
645 if (
rte->perminfoindex != 0)
647 rte->perminfoindex, es);
667 switch (
rte->jointype)
688 jointype =
"Right Semi";
691 jointype =
"Right Anti";
704 rte->joinmergedcols, es);
int bms_next_member(const Bitmapset *a, int prevbit)
int bms_singleton_member(const Bitmapset *a)
BMS_Membership bms_membership(const Bitmapset *a)
#define Assert(condition)
bool defGetBoolean(DefElem *def)
explain_per_node_hook_type explain_per_node_hook
explain_per_plan_hook_type explain_per_plan_hook
void(* explain_per_plan_hook_type)(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv)
void(* explain_per_node_hook_type)(PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, ExplainState *es)
int GetExplainExtensionId(const char *extension_name)
void * GetExplainExtensionState(ExplainState *es, int extension_id)
void SetExplainExtensionState(ExplainState *es, int extension_id, void *opaque)
void RegisterExtensionExplainOption(const char *option_name, ExplainOptionHandler handler)
#define palloc0_object(type)
#define PG_MODULE_MAGIC_EXT(...)
const char * GetLockmodeName(LOCKMETHODID lockmethodid, LOCKMODE mode)
#define DEFAULT_LOCKMETHOD
char * get_rel_name(Oid relid)
Oid get_rel_namespace(Oid relid)
char * get_namespace_name_or_temp(Oid nspid)
void pfree(void *pointer)
#define IsA(nodeptr, _type_)
#define rt_fetch(rangetable_index, rangetable)
static int list_length(const List *l)
#define foreach_xid(var, lst)
#define foreach_node(type, var, lst)
static ListCell * list_head(const List *l)
#define foreach_oid(var, lst)
static ListCell * lnext(const List *l, const ListCell *c)
#define foreach_int(var, lst)
static void overexplain_per_plan_hook(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv)
static void overexplain_bitmapset(const char *qlabel, Bitmapset *bms, ExplainState *es)
static void overexplain_range_table(PlannedStmt *plannedstmt, ExplainState *es)
static explain_per_plan_hook_type prev_explain_per_plan_hook
static explain_per_node_hook_type prev_explain_per_node_hook
static overexplain_options * overexplain_ensure_options(ExplainState *es)
static void overexplain_bitmapset_list(const char *qlabel, List *bms_list, ExplainState *es)
static void overexplain_per_node_hook(PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, ExplainState *es)
static void overexplain_intlist(const char *qlabel, List *list, ExplainState *es)
static void overexplain_debug_handler(ExplainState *es, DefElem *opt, ParseState *pstate)
static void overexplain_alias(const char *qlabel, Alias *alias, ExplainState *es)
static int es_extension_id
static void overexplain_debug(PlannedStmt *plannedstmt, ExplainState *es)
static void overexplain_range_table_handler(ExplainState *es, DefElem *opt, ParseState *pstate)
static char buf[DEFAULT_XLOG_SEG_SIZE]
char * psprintf(const char *fmt,...)
const char * quote_identifier(const char *ident)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
Bitmapset * rewindPlanIDs
Bitmapset * unprunableRelids