PostgreSQL Source Code git master
Loading...
Searching...
No Matches
plpy_main.h
Go to the documentation of this file.
1/*
2 * src/pl/plpython/plpy_main.h
3 */
4
5#ifndef PLPY_MAIN_H
6#define PLPY_MAIN_H
7
8#include "plpy_procedure.h"
9
10/* the interpreter's globals dict */
12
13/*
14 * A stack of PL/Python execution contexts. Each time user-defined Python code
15 * is called, an execution context is created and put on the stack. After the
16 * Python code returns, the context is destroyed.
17 */
18typedef struct PLyExecutionContext
19{
20 PLyProcedure *curr_proc; /* the currently executing procedure */
21 MemoryContext scratch_ctx; /* a context for things like type I/O */
22 struct PLyExecutionContext *next; /* previous stack level */
24
25/* Get the current execution context */
27
28/* Get the scratch memory context for specified execution context */
30
31#endif /* PLPY_MAIN_H */
PyObject * PLy_interp_globals
Definition plpy_main.c:50
PLyExecutionContext * PLy_current_execution_context(void)
Definition plpy_main.c:336
MemoryContext PLy_get_scratch_context(PLyExecutionContext *context)
Definition plpy_main.c:345
static int fb(int x)
struct PLyExecutionContext * next
Definition plpy_main.h:22
PLyProcedure * curr_proc
Definition plpy_main.h:20
MemoryContext scratch_ctx
Definition plpy_main.h:21