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

Function PLy_push_execution_context

src/pl/plpython/plpy_main.c:477–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475}
476
477static PLyExecutionContext *
478PLy_push_execution_context(bool atomic_context)
479{
480 PLyExecutionContext *context;
481
482 /* Pick a memory context similar to what SPI uses. */
483 context = (PLyExecutionContext *)
484 MemoryContextAlloc(atomic_context ? TopTransactionContext : PortalContext,
485 sizeof(PLyExecutionContext));
486 context->curr_proc = NULL;
487 context->scratch_ctx = NULL;
488 context->next = PLy_execution_contexts;
489 PLy_execution_contexts = context;
490 return context;
491}
492
493static void
494PLy_pop_execution_context(void)

Callers 2

plpython_call_handlerFunction · 0.85
plpython_inline_handlerFunction · 0.85

Calls 1

MemoryContextAllocFunction · 0.85

Tested by

no test coverage detected