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

Function SPI_cursor_open

src/backend/executor/spi.c:1472–1491  ·  view source on GitHub ↗

* SPI_cursor_open() * * Open a prepared SPI plan as a portal */

Source from the content-addressed store, hash-verified

1470 * Open a prepared SPI plan as a portal
1471 */
1472Portal
1473SPI_cursor_open(const char *name, SPIPlanPtr plan,
1474 Datum *Values, const char *Nulls,
1475 bool read_only)
1476{
1477 Portal portal;
1478 ParamListInfo paramLI;
1479
1480 /* build transient ParamListInfo in caller's context */
1481 paramLI = _SPI_convert_params(plan->nargs, plan->argtypes,
1482 Values, Nulls);
1483
1484 portal = SPI_cursor_open_internal(name, plan, paramLI, read_only);
1485
1486 /* done with the transient ParamListInfo */
1487 if (paramLI)
1488 pfree(paramLI);
1489
1490 return portal;
1491}
1492
1493
1494/*

Callers 8

plperl_spi_queryFunction · 0.85
PLy_cursor_queryFunction · 0.85
PLy_cursor_planFunction · 0.85
query_to_xmlschemaFunction · 0.85
tsquery_rewrite_queryFunction · 0.85
ts_stat_sqlFunction · 0.85

Calls 3

_SPI_convert_paramsFunction · 0.85
SPI_cursor_open_internalFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected