PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "plpgsql.h"
#include "utils/builtins.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
#include "utils/varlena.h"
Go to the source code of this file.
Functions | |
static bool | plpgsql_extra_checks_check_hook (char **newvalue, void **extra, GucSource source) |
static void | plpgsql_extra_warnings_assign_hook (const char *newvalue, void *extra) |
static void | plpgsql_extra_errors_assign_hook (const char *newvalue, void *extra) |
void | _PG_init (void) |
PG_FUNCTION_INFO_V1 (plpgsql_call_handler) | |
Datum | plpgsql_call_handler (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (plpgsql_inline_handler) | |
Datum | plpgsql_inline_handler (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (plpgsql_validator) | |
Datum | plpgsql_validator (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
static const struct config_enum_entry | variable_conflict_options [] |
int | plpgsql_variable_conflict = PLPGSQL_RESOLVE_ERROR |
bool | plpgsql_print_strict_params = false |
bool | plpgsql_check_asserts = true |
static char * | plpgsql_extra_warnings_string = NULL |
static char * | plpgsql_extra_errors_string = NULL |
int | plpgsql_extra_warnings |
int | plpgsql_extra_errors |
PLpgSQL_plugin ** | plpgsql_plugin_ptr = NULL |
void _PG_init | ( | void | ) |
Definition at line 145 of file pl_handler.c.
References DefineCustomBoolVariable(), DefineCustomEnumVariable(), DefineCustomStringVariable(), find_rendezvous_variable(), gettext_noop, GUC_LIST_INPUT, MarkGUCPrefixReserved(), pg_bindtextdomain(), PGC_SUSET, PGC_USERSET, plpgsql_check_asserts, plpgsql_extra_checks_check_hook(), plpgsql_extra_errors_assign_hook(), plpgsql_extra_errors_string, plpgsql_extra_warnings_assign_hook(), plpgsql_extra_warnings_string, plpgsql_HashTableInit(), plpgsql_plugin_ptr, plpgsql_print_strict_params, PLPGSQL_RESOLVE_ERROR, plpgsql_subxact_cb(), plpgsql_variable_conflict, plpgsql_xact_cb(), RegisterSubXactCallback(), RegisterXactCallback(), TEXTDOMAIN, and variable_conflict_options.
PG_FUNCTION_INFO_V1 | ( | plpgsql_call_handler | ) |
PG_FUNCTION_INFO_V1 | ( | plpgsql_inline_handler | ) |
PG_FUNCTION_INFO_V1 | ( | plpgsql_validator | ) |
Datum plpgsql_call_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 222 of file pl_handler.c.
References CALLED_AS_EVENT_TRIGGER, CALLED_AS_TRIGGER, castNode, PLpgSQL_function::cur_estate, elog, ERROR, IsA, PG_END_TRY, PG_FINALLY, PG_TRY, plpgsql_compile(), plpgsql_exec_event_trigger(), plpgsql_exec_function(), plpgsql_exec_trigger(), PointerGetDatum(), ReleaseAllPlanCacheRefsInOwner(), PLpgSQL_function::requires_procedure_resowner, ResourceOwnerCreate(), ResourceOwnerDelete(), SPI_connect_ext(), SPI_finish(), SPI_OK_FINISH, SPI_OPT_NONATOMIC, SPI_result_code_string(), and PLpgSQL_function::use_count.
|
static |
Definition at line 60 of file pl_handler.c.
References GUC_check_errdetail, guc_malloc(), lfirst, list_free(), LOG, pfree(), pg_strcasecmp(), PLPGSQL_XCHECK_ALL, PLPGSQL_XCHECK_NONE, PLPGSQL_XCHECK_SHADOWVAR, PLPGSQL_XCHECK_STRICTMULTIASSIGNMENT, PLPGSQL_XCHECK_TOOMANYROWS, pstrdup(), and SplitIdentifierString().
Referenced by _PG_init().
|
static |
Definition at line 133 of file pl_handler.c.
References plpgsql_extra_errors.
Referenced by _PG_init().
|
static |
Definition at line 127 of file pl_handler.c.
References plpgsql_extra_warnings.
Referenced by _PG_init().
Datum plpgsql_inline_handler | ( | PG_FUNCTION_ARGS | ) |
Definition at line 314 of file pl_handler.c.
References Assert, InlineCodeBlock::atomic, castNode, CreateExecutorState(), CurrentMemoryContext, DatumGetPointer(), elog, ERROR, FmgrInfo::fn_mcxt, FmgrInfo::fn_oid, FreeExecutorState(), GetCurrentSubTransactionId(), InvalidOid, LOCAL_FCINFO, MemSet, PG_CATCH, PG_END_TRY, PG_GETARG_DATUM, PG_RE_THROW, PG_TRY, plpgsql_compile_inline(), plpgsql_exec_function(), plpgsql_free_function_memory(), plpgsql_subxact_cb(), ReleaseAllPlanCacheRefsInOwner(), ResourceOwnerCreate(), ResourceOwnerDelete(), SizeForFunctionCallInfo, InlineCodeBlock::source_text, SPI_connect_ext(), SPI_finish(), SPI_OK_FINISH, SPI_OPT_NONATOMIC, SPI_result_code_string(), SUBXACT_EVENT_ABORT_SUB, and PLpgSQL_function::use_count.
Datum plpgsql_validator | ( | PG_FUNCTION_ARGS | ) |
Definition at line 440 of file pl_handler.c.
References check_function_bodies, CheckFunctionValidatorAccess(), CurrentMemoryContext, elog, ereport, errcode(), errmsg(), ERROR, FmgrInfo::fn_mcxt, FmgrInfo::fn_oid, format_type_be(), get_func_arg_info(), get_typtype(), GETSTRUCT, HeapTupleIsValid, i, LOCAL_FCINFO, MemSet, ObjectIdGetDatum(), PG_GETARG_OID, PG_RETURN_VOID, plpgsql_compile(), ReleaseSysCache(), SearchSysCache1(), SizeForFunctionCallInfo, SPI_connect(), SPI_finish(), SPI_OK_FINISH, SPI_result_code_string(), EventTriggerData::type, and TriggerData::type.
PG_MODULE_MAGIC |
Definition at line 34 of file pl_handler.c.
Definition at line 48 of file pl_handler.c.
Referenced by _PG_init(), and exec_stmt_assert().
int plpgsql_extra_errors |
Definition at line 53 of file pl_handler.c.
Referenced by do_compile(), exec_move_row_from_fields(), exec_stmt_execsql(), and plpgsql_extra_errors_assign_hook().
|
static |
Definition at line 51 of file pl_handler.c.
Referenced by _PG_init().
int plpgsql_extra_warnings |
Definition at line 52 of file pl_handler.c.
Referenced by do_compile(), exec_move_row_from_fields(), exec_stmt_execsql(), and plpgsql_extra_warnings_assign_hook().
|
static |
Definition at line 50 of file pl_handler.c.
Referenced by _PG_init().
PLpgSQL_plugin** plpgsql_plugin_ptr = NULL |
Definition at line 56 of file pl_handler.c.
Referenced by _PG_init(), exec_stmts(), exec_toplevel_block(), plpgsql_estate_setup(), plpgsql_exec_event_trigger(), plpgsql_exec_function(), and plpgsql_exec_trigger().
Definition at line 46 of file pl_handler.c.
Referenced by _PG_init(), do_compile(), and plpgsql_compile_inline().
int plpgsql_variable_conflict = PLPGSQL_RESOLVE_ERROR |
Definition at line 44 of file pl_handler.c.
Referenced by _PG_init(), do_compile(), and plpgsql_compile_inline().
|
static |
Definition at line 34 of file pl_handler.c.
Referenced by _PG_init().