openGauss supports plpython

This commit is contained in:
JinLiOnline
2020-10-26 23:53:37 +08:00
parent b27c38a64e
commit 043eeab8da
24 changed files with 699 additions and 274 deletions

View File

@ -119,6 +119,25 @@ typedef int Py_ssize_t;
#undef TEXTDOMAIN
#define TEXTDOMAIN PG_TEXTDOMAIN("plpython")
typedef struct plpy_t_context_struct {
bool inited;
MemoryContext plpython_func_cxt;
HTAB* PLy_spi_exceptions;
HTAB* PLy_procedure_cache;
/* a list of nested explicit subtransactions */
List* explicit_subtransactions;
PyObject* PLy_exc_error;
PyObject* PLy_exc_fatal;
PyObject* PLy_exc_spi_error;
PyObject* PLy_interp_globals;
int Ply_LockLevel;
} plpy_t_context_struct;
extern THR_LOCAL plpy_t_context_struct plpy_t_context;
#include <compile.h>
#include <eval.h>