33#define TEXTDOMAIN PG_TEXTDOMAIN("plpgsql")
36#define _(x) dgettext(TEXTDOMAIN, x)
1203#define PLPGSQL_XCHECK_NONE 0
1204#define PLPGSQL_XCHECK_SHADOWVAR (1 << 1)
1205#define PLPGSQL_XCHECK_TOOMANYROWS (1 << 2)
1206#define PLPGSQL_XCHECK_STRICTMULTIASSIGNMENT (1 << 3)
1207#define PLPGSQL_XCHECK_ALL ((int) ~0)
1255 bool add2namespace);
1258 bool add2namespace);
1260 const char *fldname);
1262 bool allow_sqlstate);
1273 EState *simple_eval_estate,
1301 const char *name1,
const char *name2,
1302 const char *name3,
int *names_used);
1324 int startlocation,
int endlocation);
1326extern void plpgsql_peek2(
int *tok1_p,
int *tok2_p,
int *tok1_loc,
#define pg_attribute_noreturn()
#define FLEXIBLE_ARRAY_MEMBER
uint32 LocalTransactionId
struct PLpgSQL_stmt_dynexecute PLpgSQL_stmt_dynexecute
void plpgsql_scanner_finish(void)
void plpgsql_ns_pop(void)
struct PLpgSQL_type PLpgSQL_type
int plpgsql_variable_conflict
struct PLpgSQL_stmt_while PLpgSQL_stmt_while
struct PLpgSQL_function PLpgSQL_function
bool plpgsql_check_asserts
int plpgsql_scanner_errposition(int location)
struct PLpgSQL_stmt_assert PLpgSQL_stmt_assert
PLpgSQL_condition * plpgsql_parse_err_condition(char *condname)
@ PLPGSQL_RESOLVE_VARIABLE
struct PLpgSQL_stmt_open PLpgSQL_stmt_open
int plpgsql_extra_warnings
struct PLpgSQL_func_hashkey PLpgSQL_func_hashkey
struct PLpgSQL_stmt_fetch PLpgSQL_stmt_fetch
struct PLpgSQL_raise_option PLpgSQL_raise_option
PLpgSQL_recfield * plpgsql_build_recfield(PLpgSQL_rec *rec, const char *fldname)
int plpgsql_add_initdatums(int **varnos)
MemoryContext plpgsql_compile_tmp_cxt
struct PLpgSQL_variable PLpgSQL_variable
struct PLpgSQL_nsitem PLpgSQL_nsitem
struct PLpgSQL_stmt_getdiag PLpgSQL_stmt_getdiag
struct PLpgSQL_stmt_return_next PLpgSQL_stmt_return_next
@ PLPGSQL_STMT_RETURN_QUERY
@ PLPGSQL_STMT_RETURN_NEXT
@ PLPGSQL_STMT_DYNEXECUTE
struct PLpgSQL_if_elsif PLpgSQL_if_elsif
void plpgsql_ns_init(void)
PGDLLEXPORT void plpgsql_parser_setup(struct ParseState *pstate, PLpgSQL_expr *expr)
struct PLpgSQL_stmt_dynfors PLpgSQL_stmt_dynfors
struct PLpgSQL_stmt PLpgSQL_stmt
struct PLpgSQL_stmt_call PLpgSQL_stmt_call
struct PLpgSQL_stmt_fors PLpgSQL_stmt_fors
Datum plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo, EState *simple_eval_estate, ResourceOwner simple_eval_resowner, ResourceOwner procedure_resowner, bool atomic)
PLpgSQL_type * plpgsql_parse_cwordrowtype(List *idents)
struct PLpgSQL_stmt_perform PLpgSQL_stmt_perform
int plpgsql_location_to_lineno(int location)
struct PLpgSQL_diag_item PLpgSQL_diag_item
PLpgSQL_nsitem * plpgsql_ns_find_nearest_loop(PLpgSQL_nsitem *ns_cur)
struct PLpgSQL_row PLpgSQL_row
void plpgsql_HashTableInit(void)
PLpgSQL_nsitem * plpgsql_ns_lookup_label(PLpgSQL_nsitem *ns_cur, const char *name)
@ IDENTIFIER_LOOKUP_DECLARE
@ IDENTIFIER_LOOKUP_NORMAL
struct PLpgSQL_var PLpgSQL_var
void plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate, PLpgSQL_datum *datum, Oid *typeId, int32 *typMod, Oid *collation)
PGDLLEXPORT Oid plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate, PLpgSQL_datum *datum)
PGDLLEXPORT PLpgSQL_nsitem * plpgsql_ns_lookup(PLpgSQL_nsitem *ns_cur, bool localmode, const char *name1, const char *name2, const char *name3, int *names_used)
IdentifierLookup plpgsql_IdentifierLookup
struct PLpgSQL_stmt_raise PLpgSQL_stmt_raise
void plpgsql_dumptree(PLpgSQL_function *func)
char * plpgsql_error_funcname
PLpgSQL_raise_option_type
@ PLPGSQL_RAISEOPTION_COLUMN
@ PLPGSQL_RAISEOPTION_TABLE
@ PLPGSQL_RAISEOPTION_SCHEMA
@ PLPGSQL_RAISEOPTION_CONSTRAINT
@ PLPGSQL_RAISEOPTION_DETAIL
@ PLPGSQL_RAISEOPTION_MESSAGE
@ PLPGSQL_RAISEOPTION_HINT
@ PLPGSQL_RAISEOPTION_ERRCODE
@ PLPGSQL_RAISEOPTION_DATATYPE
PGDLLEXPORT PLpgSQL_type * plpgsql_build_datatype(Oid typeOid, int32 typmod, Oid collation, TypeName *origtypname)
PLpgSQL_stmt_block * plpgsql_parse_result
bool plpgsql_print_strict_params
bool plpgsql_check_syntax
struct PLpgSQL_stmt_return PLpgSQL_stmt_return
bool plpgsql_token_is_unreserved_keyword(int token)
void plpgsql_yyerror(const char *message) pg_attribute_noreturn()
struct PLpgSQL_stmt_exit PLpgSQL_stmt_exit
struct PLpgSQL_stmt_block PLpgSQL_stmt_block
struct PLpgSQL_rec PLpgSQL_rec
struct PLpgSQL_stmt_loop PLpgSQL_stmt_loop
@ PLPGSQL_PROMISE_TG_RELID
@ PLPGSQL_PROMISE_TG_WHEN
@ PLPGSQL_PROMISE_TG_ARGV
@ PLPGSQL_PROMISE_TG_TABLE_SCHEMA
@ PLPGSQL_PROMISE_TG_EVENT
@ PLPGSQL_PROMISE_TG_TABLE_NAME
@ PLPGSQL_PROMISE_TG_LEVEL
@ PLPGSQL_PROMISE_TG_NARGS
@ PLPGSQL_PROMISE_TG_NAME
struct PLpgSQL_stmt_forc PLpgSQL_stmt_forc
int plpgsql_yyparse(void)
struct PLpgSQL_stmt_return_query PLpgSQL_stmt_return_query
PLpgSQL_plugin ** plpgsql_plugin_ptr
struct PLpgSQL_stmt_case PLpgSQL_stmt_case
struct PLpgSQL_stmt_foreach_a PLpgSQL_stmt_foreach_a
void plpgsql_free_function_memory(PLpgSQL_function *func)
void plpgsql_append_source_text(StringInfo buf, int startlocation, int endlocation)
struct PLpgSQL_expr PLpgSQL_expr
struct PLpgSQL_stmt_close PLpgSQL_stmt_close
struct PLpgSQL_plugin PLpgSQL_plugin
PLpgSQL_type * plpgsql_build_datatype_arrayof(PLpgSQL_type *dtype)
void plpgsql_ns_additem(PLpgSQL_nsitem_type itemtype, int itemno, const char *name)
PLpgSQL_function * plpgsql_curr_compile
bool plpgsql_parse_dblword(char *word1, char *word2, PLwdatum *wdatum, PLcword *cword)
struct PLpgSQL_stmt_commit PLpgSQL_stmt_commit
PLpgSQL_type * plpgsql_parse_wordtype(char *ident)
struct PLpgSQL_datum PLpgSQL_datum
void plpgsql_peek2(int *tok1_p, int *tok2_p, int *tok1_loc, int *tok2_loc)
struct PLpgSQL_case_when PLpgSQL_case_when
void plpgsql_adddatum(PLpgSQL_datum *newdatum)
struct PLpgSQL_exception_block PLpgSQL_exception_block
PLpgSQL_datum ** plpgsql_Datums
struct PLpgSQL_stmt_execsql PLpgSQL_stmt_execsql
int plpgsql_latest_lineno(void)
int plpgsql_token_length(void)
bool plpgsql_parse_word(char *word1, const char *yytxt, bool lookup, PLwdatum *wdatum, PLword *word)
bool plpgsql_DumpExecTree
PLpgSQL_type * plpgsql_parse_cwordtype(List *idents)
PLpgSQL_rec * plpgsql_build_record(const char *refname, int lineno, PLpgSQL_type *dtype, Oid rectypeid, bool add2namespace)
HeapTuple plpgsql_exec_trigger(PLpgSQL_function *func, TriggerData *trigdata)
PGDLLEXPORT PLpgSQL_function * plpgsql_compile(FunctionCallInfo fcinfo, bool forValidator)
PGDLLEXPORT const char * plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
struct PLpgSQL_stmt_rollback PLpgSQL_stmt_rollback
struct PLpgSQL_execstate PLpgSQL_execstate
void plpgsql_subxact_cb(SubXactEvent event, SubTransactionId mySubid, SubTransactionId parentSubid, void *arg)
void plpgsql_ns_push(const char *label, PLpgSQL_label_type label_type)
void plpgsql_exec_event_trigger(PLpgSQL_function *func, EventTriggerData *trigdata)
bool plpgsql_parse_tripword(char *word1, char *word2, char *word3, PLwdatum *wdatum, PLcword *cword)
struct PLpgSQL_exception PLpgSQL_exception
PLpgSQL_type * plpgsql_parse_wordrowtype(char *ident)
struct PLpgSQL_condition PLpgSQL_condition
struct PLpgSQL_recfield PLpgSQL_recfield
void plpgsql_scanner_init(const char *str)
int plpgsql_base_yylex(void)
PLpgSQL_nsitem * plpgsql_ns_top(void)
struct PLpgSQL_stmt_forq PLpgSQL_stmt_forq
PGDLLEXPORT int plpgsql_recognize_err_condition(const char *condname, bool allow_sqlstate)
void plpgsql_push_back_token(int token)
PLpgSQL_variable * plpgsql_build_variable(const char *refname, int lineno, PLpgSQL_type *dtype, bool add2namespace)
const char * plpgsql_getdiag_kindname(PLpgSQL_getdiag_kind kind)
struct PLpgSQL_stmt_if PLpgSQL_stmt_if
struct PLpgSQL_stmt_fori PLpgSQL_stmt_fori
PLpgSQL_function * plpgsql_compile_inline(char *proc_source)
void plpgsql_xact_cb(XactEvent event, void *arg)
@ PLPGSQL_GETDIAG_ERROR_DETAIL
@ PLPGSQL_GETDIAG_SCHEMA_NAME
@ PLPGSQL_GETDIAG_MESSAGE_TEXT
@ PLPGSQL_GETDIAG_DATATYPE_NAME
@ PLPGSQL_GETDIAG_TABLE_NAME
@ PLPGSQL_GETDIAG_CONSTRAINT_NAME
@ PLPGSQL_GETDIAG_COLUMN_NAME
@ PLPGSQL_GETDIAG_ROW_COUNT
@ PLPGSQL_GETDIAG_RETURNED_SQLSTATE
@ PLPGSQL_GETDIAG_CONTEXT
@ PLPGSQL_GETDIAG_ERROR_HINT
@ PLPGSQL_GETDIAG_ERROR_CONTEXT
@ PLPGSQL_GETDIAG_ROUTINE_OID
struct PLpgSQL_stmt_assign PLpgSQL_stmt_assign
static void word(struct vars *v, int dir, struct state *lp, struct state *rp)
struct PLpgSQL_condition * next
PLpgSQL_getdiag_kind kind
PLpgSQL_condition * conditions
EState * simple_eval_estate
ResourceOwner simple_eval_resowner
ExprContext * eval_econtext
ResourceOwner procedure_resowner
Tuplestorestate * tuple_store
PLpgSQL_variable * err_var
MemoryContext tuple_store_cxt
TupleDesc tuple_store_desc
MemoryContext datum_context
MemoryContext stmt_mcontext
SPITupleTable * eval_tuptable
EventTriggerData * evtrigdata
ResourceOwner tuple_store_owner
MemoryContext stmt_mcontext_parent
CachedPlanSource * expr_simple_plansource
CachedPlan * expr_simple_plan
struct PLpgSQL_nsitem * ns
ExprState * expr_simple_state
struct PLpgSQL_function * func
LocalTransactionId expr_simple_plan_lxid
LocalTransactionId expr_simple_lxid
Oid argtypes[FUNC_MAX_ARGS]
bool requires_procedure_resowner
PLpgSQL_trigtype fn_is_trigger
int fn_argvarnos[FUNC_MAX_ARGS]
PLpgSQL_stmt_block * action
struct PLpgSQL_execstate * cur_estate
PLpgSQL_resolve_option resolve_option
PLpgSQL_func_hashkey * fn_hashkey
char name[FLEXIBLE_ARRAY_MEMBER]
struct PLpgSQL_nsitem * prev
PLpgSQL_nsitem_type itemtype
void(* stmt_end)(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
void(* func_beg)(PLpgSQL_execstate *estate, PLpgSQL_function *func)
Datum(* cast_value)(PLpgSQL_execstate *estate, Datum value, bool *isnull, Oid valtype, int32 valtypmod, Oid reqtype, int32 reqtypmod)
void(* error_callback)(void *arg)
void(* func_end)(PLpgSQL_execstate *estate, PLpgSQL_function *func)
void(* assign_expr)(PLpgSQL_execstate *estate, PLpgSQL_datum *target, PLpgSQL_expr *expr)
void(* func_setup)(PLpgSQL_execstate *estate, PLpgSQL_function *func)
void(* assign_value)(PLpgSQL_execstate *estate, PLpgSQL_datum *target, Datum value, bool isNull, Oid valtype, int32 valtypmod)
void(* eval_datum)(PLpgSQL_execstate *estate, PLpgSQL_datum *datum, Oid *typeId, int32 *typetypmod, Datum *value, bool *isnull)
void(* stmt_beg)(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
PLpgSQL_raise_option_type opt_type
ExpandedRecordHeader * erh
PLpgSQL_expr * default_val
ExpandedRecordFieldInfo finfo
PLpgSQL_expr * default_val
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_exception_block * exceptions
PLpgSQL_stmt_type cmd_type
PLpgSQL_variable * target
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_variable * target
PLpgSQL_stmt_type cmd_type
PLpgSQL_variable * target
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
bool returns_multiple_rows
PLpgSQL_variable * target
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_stmt_type cmd_type
PLpgSQL_promise_type promise
int cursor_explicit_argrow
PLpgSQL_expr * cursor_explicit_expr
PLpgSQL_expr * default_val
PLpgSQL_expr * default_val