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

Function SPI_execute_plan_with_paramlist

src/backend/executor/spi.c:760–785  ·  view source on GitHub ↗

Execute a previously prepared plan */

Source from the content-addressed store, hash-verified

758
759/* Execute a previously prepared plan */
760int
761SPI_execute_plan_with_paramlist(SPIPlanPtr plan, ParamListInfo params,
762 bool read_only, long tcount)
763{
764 SPIExecuteOptions options;
765 int res;
766
767 if (plan == NULL || plan->magic != _SPI_PLAN_MAGIC || tcount < 0)
768 return SPI_ERROR_ARGUMENT;
769
770 res = _SPI_begin_call(true);
771 if (res < 0)
772 return res;
773
774 memset(&options, 0, sizeof(options));
775 options.params = params;
776 options.read_only = read_only;
777 options.tcount = tcount;
778
779 res = _SPI_execute_plan(plan, &options,
780 InvalidSnapshot, InvalidSnapshot,
781 true);
782
783 _SPI_end_call(true);
784 return res;
785}
786
787/*
788 * SPI_execute_snapshot -- identical to SPI_execute_plan, except that we allow

Callers 2

exec_stmt_execsqlFunction · 0.85
exec_run_selectFunction · 0.85

Calls 3

_SPI_begin_callFunction · 0.85
_SPI_execute_planFunction · 0.85
_SPI_end_callFunction · 0.85

Tested by

no test coverage detected