MCPcopy Create free account
hub / github.com/apache/cloudberry / ProcessUtility

Function ProcessUtility

src/backend/tcop/utility.c:569–612  ·  view source on GitHub ↗

* ProcessUtility * general utility function invoker * * pstmt: PlannedStmt wrapper for the utility statement * queryString: original source text of command * readOnlyTree: if true, pstmt's node tree must not be modified * context: identifies source of statement (toplevel client command, * non-toplevel client command, subcommand of a larger utility command) * params: parameters to use dur

Source from the content-addressed store, hash-verified

567 * and stmt_len that were given for the whole statement.
568 */
569void
570ProcessUtility(PlannedStmt *pstmt,
571 const char *queryString,
572 bool readOnlyTree,
573 ProcessUtilityContext context,
574 ParamListInfo params,
575 QueryEnvironment *queryEnv,
576 DestReceiver *dest,
577 QueryCompletion *qc)
578{
579 Assert(IsA(pstmt, PlannedStmt));
580 Assert(pstmt->commandType == CMD_UTILITY);
581 Assert(queryString != NULL); /* required as of 8.4 */
582 Assert(qc == NULL || qc->commandTag == CMDTAG_UNKNOWN);
583
584 /*
585 * Greenplum specific code:
586 * Please refer to the comments at the definition of process_utility_nesting_level.
587 */
588 process_utility_nesting_level++;
589 PG_TRY();
590 {
591 /*
592 * We provide a function hook variable that lets loadable plugins get
593 * control when ProcessUtility is called. Such a plugin would normally
594 * call standard_ProcessUtility().
595 */
596 if (ProcessUtility_hook)
597 (*ProcessUtility_hook) (pstmt, queryString, readOnlyTree,
598 context, params, queryEnv,
599 dest, qc);
600 else
601 standard_ProcessUtility(pstmt, queryString, readOnlyTree,
602 context, params, queryEnv,
603 dest, qc);
604 process_utility_nesting_level--;
605 }
606 PG_CATCH();
607 {
608 process_utility_nesting_level--;
609 PG_RE_THROW();
610 }
611 PG_END_TRY();
612}
613
614/*
615 * standard_ProcessUtility itself deals only with utility commands for

Callers 11

PortalRunUtilityFunction · 0.85
ProcessUtilitySlowFunction · 0.85
AtExecGPSplitPartitionFunction · 0.85
ATExecGPPartCmdsFunction · 0.85
execute_sql_stringFunction · 0.85
ImportForeignSchemaFunction · 0.85
CreateSchemaCommandFunction · 0.85
prebuild_temp_tableFunction · 0.85
postquel_getnextFunction · 0.85
_SPI_execute_planFunction · 0.85

Calls 1

standard_ProcessUtilityFunction · 0.85

Tested by

no test coverage detected