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 */
11
extern
PyObject
*
PLy_interp_globals
;
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
*/
18
typedef
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 */
23
}
PLyExecutionContext
;
24
25
/* Get the current execution context */
26
extern
PLyExecutionContext
*
PLy_current_execution_context
(
void
);
27
28
/* Get the scratch memory context for specified execution context */
29
extern
MemoryContext
PLy_get_scratch_context
(
PLyExecutionContext
*context);
30
31
#endif
/* PLPY_MAIN_H */
PLy_interp_globals
PyObject * PLy_interp_globals
Definition
plpy_main.c:50
PLy_current_execution_context
PLyExecutionContext * PLy_current_execution_context(void)
Definition
plpy_main.c:336
PLy_get_scratch_context
MemoryContext PLy_get_scratch_context(PLyExecutionContext *context)
Definition
plpy_main.c:345
plpy_procedure.h
fb
static int fb(int x)
Definition
preproc-init.c:92
MemoryContextData
Definition
memnodes.h:118
PLyExecutionContext
Definition
plpy_main.h:19
PLyExecutionContext::next
struct PLyExecutionContext * next
Definition
plpy_main.h:22
PLyExecutionContext::curr_proc
PLyProcedure * curr_proc
Definition
plpy_main.h:20
PLyExecutionContext::scratch_ctx
MemoryContext scratch_ctx
Definition
plpy_main.h:21
PLyProcedure
Definition
plpy_procedure.h:36
src
pl
plpython
plpy_main.h
Generated on Sun Feb 1 2026 00:13:18 for PostgreSQL Source Code by
1.9.8