|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "catalog/pg_proc.h"#include "catalog/pg_type.h"#include "commands/event_trigger.h"#include "commands/trigger.h"#include "executor/spi.h"#include "miscadmin.h"#include "plpy_elog.h"#include "plpy_exec.h"#include "plpy_main.h"#include "plpy_plpymodule.h"#include "plpy_procedure.h"#include "plpy_subxactobject.h"#include "plpy_util.h"#include "utils/guc.h"#include "utils/memutils.h"#include "utils/rel.h"#include "utils/syscache.h"
Go to the source code of this file.
Variables | |
| PyObject * | PLy_interp_globals = NULL |
| static PLyExecutionContext * | PLy_execution_contexts = NULL |
Definition at line 57 of file plpy_main.c.
References ERROR, explicit_subtransactions, FATAL, fb(), init_procedure_caches(), NIL, pg_bindtextdomain(), PLy_elog, PLy_execution_contexts, PLy_interp_globals, PyInit_plpy(), and TEXTDOMAIN.
| PG_FUNCTION_INFO_V1 | ( | plpython3_call_handler | ) |
| PG_FUNCTION_INFO_V1 | ( | plpython3_inline_handler | ) |
| PG_FUNCTION_INFO_V1 | ( | plpython3_validator | ) |
| PG_MODULE_MAGIC_EXT | ( | . | name = "plpython", |
| . | version = PG_VERSION |
||
| ) |
| Datum plpython3_call_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 144 of file plpy_main.c.
References CALLED_AS_EVENT_TRIGGER, CALLED_AS_TRIGGER, castNode, error_context_stack, fb(), InvalidOid, IsA, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PLPY_EVENT_TRIGGER, PLPY_NOT_TRIGGER, PLPY_TRIGGER, plpython_error_callback(), PLy_exec_event_trigger(), PLy_exec_function(), PLy_exec_trigger(), PLy_pop_execution_context(), PLy_procedure_get(), PLy_push_execution_context(), PointerGetDatum(), RelationGetRelid, SPI_connect_ext(), and SPI_OPT_NONATOMIC.
| Datum plpython3_inline_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 220 of file plpy_main.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, DatumGetPointer(), error_context_stack, fb(), FmgrInfo::fn_mcxt, FmgrInfo::fn_oid, InvalidOid, PLyProcedure::langid, LOCAL_FCINFO, PLyProcedure::mcxt, MemoryContextStrdup(), MemSet, PG_CATCH, PG_END_TRY, PG_GETARG_DATUM, PG_RE_THROW, PG_RETURN_VOID, PG_TRY, plpython_inline_error_callback(), PLy_exec_function(), PLy_pop_execution_context(), PLy_procedure_compile(), PLy_procedure_delete(), PLy_push_execution_context(), PLyProcedure::pyname, PLyProcedure::result, SizeForFunctionCallInfo, SPI_connect_ext(), SPI_OPT_NONATOMIC, TopMemoryContext, and PLyObToDatum::typoid.
| Datum plpython3_validator | ( | PG_FUNCTION_ARGS | ) |
Definition at line 114 of file plpy_main.c.
References check_function_bodies, CheckFunctionValidatorAccess(), elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), PG_GETARG_OID, PG_RETURN_VOID, PLy_procedure_get(), PLy_procedure_is_trigger(), ReleaseSysCache(), and SearchSysCache1().
Definition at line 314 of file plpy_main.c.
References arg, errcontext, fb(), and PLy_procedure_name().
Referenced by plpython3_call_handler().
Definition at line 330 of file plpy_main.c.
References errcontext.
Referenced by plpython3_inline_handler().
| PLyExecutionContext * PLy_current_execution_context | ( | void | ) |
Definition at line 336 of file plpy_main.c.
References elog, ERROR, fb(), and PLy_execution_contexts.
Referenced by plpython_return_error_callback(), plpython_trigger_error_callback(), PLy_commit(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_cursor_plan(), PLy_cursor_query(), PLy_input_convert(), PLy_input_from_tuple(), PLy_rollback(), PLy_spi_execute_fetch_result(), PLy_spi_execute_plan(), PLy_spi_execute_query(), PLy_spi_prepare(), PLy_traceback(), PLyDict_FromComposite(), and PLyObject_ToComposite().
| MemoryContext PLy_get_scratch_context | ( | PLyExecutionContext * | context | ) |
Definition at line 345 of file plpy_main.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, fb(), PLyExecutionContext::scratch_ctx, and TopTransactionContext.
Referenced by PLy_input_convert(), and PLy_input_from_tuple().
Definition at line 376 of file plpy_main.c.
References elog, ERROR, fb(), MemoryContextDelete(), PLyExecutionContext::next, pfree(), PLy_execution_contexts, and PLyExecutionContext::scratch_ctx.
Referenced by plpython3_call_handler(), and plpython3_inline_handler().
|
static |
Definition at line 293 of file plpy_main.c.
References fb(), PLPY_EVENT_TRIGGER, PLPY_NOT_TRIGGER, and PLPY_TRIGGER.
Referenced by plpython3_validator().
|
static |
Definition at line 360 of file plpy_main.c.
References PLyExecutionContext::curr_proc, fb(), MemoryContextAlloc(), PLyExecutionContext::next, PLy_execution_contexts, PortalContext, PLyExecutionContext::scratch_ctx, and TopTransactionContext.
Referenced by plpython3_call_handler(), and plpython3_inline_handler().
|
static |
Definition at line 53 of file plpy_main.c.
Referenced by _PG_init(), PLy_current_execution_context(), PLy_pop_execution_context(), and PLy_push_execution_context().
Definition at line 50 of file plpy_main.c.
Referenced by _PG_init(), and PLy_procedure_compile().