PostgreSQL Source Code
git master
|
Go to the source code of this file.
Variables | |
static PLpgSQL_nsitem * | ns_top = NULL |
static int | dump_indent |
|
static |
Definition at line 1468 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 976 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 935 of file pl_funcs.c.
References PLpgSQL_exception::action, PLpgSQL_stmt_block::body, PLpgSQL_exception::conditions, PLpgSQL_condition::condname, dump_ind(), dump_stmts(), PLpgSQL_exception_block::exc_list, PLpgSQL_stmt_block::exceptions, PLpgSQL_stmt_block::label, lfirst, name, PLpgSQL_condition::next, and printf.
Referenced by dump_stmt(), and plpgsql_dumptree().
|
static |
Definition at line 1290 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1015 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, dump_stmts(), PLpgSQL_case_when::expr, lfirst, printf, stmt, and PLpgSQL_case_when::stmts.
Referenced by dump_stmt().
|
static |
Definition at line 1274 of file pl_funcs.c.
References dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1299 of file pl_funcs.c.
References dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1240 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, FETCH_ABSOLUTE, FETCH_BACKWARD, FETCH_FORWARD, FETCH_RELATIVE, printf, and stmt.
Referenced by dump_fetch().
|
static |
Definition at line 1506 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, i, lfirst, NIL, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1543 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, dump_stmts(), i, lfirst, NIL, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1487 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1319 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1594 of file pl_funcs.c.
References printf, and PLpgSQL_expr::query.
Referenced by dump_assert(), dump_assign(), dump_call(), dump_case(), dump_cursor_direction(), dump_dynexecute(), dump_dynfors(), dump_execsql(), dump_exit(), dump_forc(), dump_foreach_a(), dump_fori(), dump_fors(), dump_if(), dump_open(), dump_perform(), dump_raise(), dump_return(), dump_return_next(), dump_return_query(), dump_while(), and plpgsql_dumptree().
|
static |
Definition at line 1214 of file pl_funcs.c.
References dump_cursor_direction(), dump_ind(), dump_indent, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1123 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1146 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1079 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1109 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1574 of file pl_funcs.c.
References dump_ind(), PLpgSQL_diag_item::kind, lfirst, list_head(), plpgsql_getdiag_kindname(), printf, stmt, and PLpgSQL_diag_item::target.
Referenced by dump_stmt().
|
static |
Definition at line 985 of file pl_funcs.c.
References PLpgSQL_if_elsif::cond, dump_expr(), dump_ind(), dump_stmts(), lfirst, NIL, printf, stmt, and PLpgSQL_if_elsif::stmts.
Referenced by dump_stmt().
|
static |
Definition at line 822 of file pl_funcs.c.
References dump_indent, i, and printf.
Referenced by dump_assert(), dump_assign(), dump_block(), dump_call(), dump_case(), dump_close(), dump_commit(), dump_cursor_direction(), dump_dynexecute(), dump_dynfors(), dump_execsql(), dump_exit(), dump_fetch(), dump_forc(), dump_foreach_a(), dump_fori(), dump_fors(), dump_getdiag(), dump_if(), dump_loop(), dump_open(), dump_perform(), dump_raise(), dump_return(), dump_return_next(), dump_return_query(), dump_rollback(), and dump_while().
|
static |
Definition at line 1053 of file pl_funcs.c.
References dump_ind(), dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1163 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, i, lfirst, NIL, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1281 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1399 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, PLpgSQL_raise_option::expr, i, lfirst, PLpgSQL_raise_option::opt_type, PLPGSQL_RAISEOPTION_COLUMN, PLPGSQL_RAISEOPTION_CONSTRAINT, PLPGSQL_RAISEOPTION_DATATYPE, PLPGSQL_RAISEOPTION_DETAIL, PLPGSQL_RAISEOPTION_ERRCODE, PLPGSQL_RAISEOPTION_HINT, PLPGSQL_RAISEOPTION_MESSAGE, PLPGSQL_RAISEOPTION_SCHEMA, PLPGSQL_RAISEOPTION_TABLE, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1334 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1348 of file pl_funcs.c.
References dump_expr(), dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1362 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_indent, i, lfirst, NIL, printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 1309 of file pl_funcs.c.
References dump_ind(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 831 of file pl_funcs.c.
References dump_assert(), dump_assign(), dump_block(), dump_call(), dump_case(), dump_close(), dump_commit(), dump_dynexecute(), dump_dynfors(), dump_execsql(), dump_exit(), dump_fetch(), dump_forc(), dump_foreach_a(), dump_fori(), dump_fors(), dump_getdiag(), dump_if(), dump_loop(), dump_open(), dump_perform(), dump_raise(), dump_return(), dump_return_next(), dump_return_query(), dump_rollback(), dump_while(), elog, ERROR, PLPGSQL_STMT_ASSERT, PLPGSQL_STMT_ASSIGN, PLPGSQL_STMT_BLOCK, PLPGSQL_STMT_CALL, PLPGSQL_STMT_CASE, PLPGSQL_STMT_CLOSE, PLPGSQL_STMT_COMMIT, PLPGSQL_STMT_DYNEXECUTE, PLPGSQL_STMT_DYNFORS, PLPGSQL_STMT_EXECSQL, PLPGSQL_STMT_EXIT, PLPGSQL_STMT_FETCH, PLPGSQL_STMT_FORC, PLPGSQL_STMT_FOREACH_A, PLPGSQL_STMT_FORI, PLPGSQL_STMT_FORS, PLPGSQL_STMT_GETDIAG, PLPGSQL_STMT_IF, PLPGSQL_STMT_LOOP, PLPGSQL_STMT_OPEN, PLPGSQL_STMT_PERFORM, PLPGSQL_STMT_RAISE, PLPGSQL_STMT_RETURN, PLPGSQL_STMT_RETURN_NEXT, PLPGSQL_STMT_RETURN_QUERY, PLPGSQL_STMT_ROLLBACK, PLPGSQL_STMT_WHILE, printf, and stmt.
Referenced by dump_stmts().
|
static |
Definition at line 924 of file pl_funcs.c.
References dump_indent, dump_stmt(), and lfirst.
Referenced by dump_block(), dump_case(), dump_dynfors(), dump_forc(), dump_foreach_a(), dump_fori(), dump_fors(), dump_if(), dump_loop(), and dump_while().
|
static |
Definition at line 1065 of file pl_funcs.c.
References dump_expr(), dump_ind(), dump_stmts(), printf, and stmt.
Referenced by dump_stmt().
|
static |
Definition at line 674 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 497 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 480 of file pl_funcs.c.
References PLpgSQL_exception::action, PLpgSQL_stmt_block::body, PLpgSQL_exception_block::exc_list, PLpgSQL_stmt_block::exceptions, free_stmts(), and lfirst.
Referenced by free_stmt(), and plpgsql_free_function_memory().
|
static |
Definition at line 610 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 520 of file pl_funcs.c.
References PLpgSQL_case_when::expr, free_expr(), free_stmts(), lfirst, stmt, and PLpgSQL_case_when::stmts.
Referenced by free_stmt().
|
static |
|
static |
|
static |
Definition at line 687 of file pl_funcs.c.
References free_expr(), lfirst, and stmt.
Referenced by free_stmt().
|
static |
Definition at line 699 of file pl_funcs.c.
References free_expr(), free_stmts(), lfirst, and stmt.
Referenced by free_stmt().
|
static |
Definition at line 681 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 626 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 717 of file pl_funcs.c.
References PLpgSQL_expr::plan, and SPI_freeplan().
Referenced by free_assert(), free_assign(), free_call(), free_case(), free_dynexecute(), free_dynfors(), free_execsql(), free_exit(), free_fetch(), free_forc(), free_foreach_a(), free_fori(), free_fors(), free_if(), free_open(), free_perform(), free_raise(), free_return(), free_return_next(), free_return_query(), free_while(), and plpgsql_free_function_memory().
|
static |
Definition at line 593 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 565 of file pl_funcs.c.
References free_expr(), free_stmts(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 572 of file pl_funcs.c.
References free_expr(), free_stmts(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 549 of file pl_funcs.c.
References free_expr(), free_stmts(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 558 of file pl_funcs.c.
References free_expr(), free_stmts(), and stmt.
Referenced by free_stmt().
|
static |
|
static |
Definition at line 503 of file pl_funcs.c.
References PLpgSQL_if_elsif::cond, free_expr(), free_stmts(), lfirst, stmt, and PLpgSQL_if_elsif::stmts.
Referenced by free_stmt().
|
static |
Definition at line 536 of file pl_funcs.c.
References free_stmts(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 579 of file pl_funcs.c.
References free_expr(), lfirst, and stmt.
Referenced by free_stmt().
|
static |
Definition at line 604 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 657 of file pl_funcs.c.
References PLpgSQL_raise_option::expr, free_expr(), lfirst, and stmt.
Referenced by free_stmt().
|
static |
Definition at line 632 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 638 of file pl_funcs.c.
References free_expr(), and stmt.
Referenced by free_stmt().
|
static |
Definition at line 644 of file pl_funcs.c.
References free_expr(), lfirst, and stmt.
Referenced by free_stmt().
|
static |
|
static |
Definition at line 377 of file pl_funcs.c.
References elog, ERROR, free_assert(), free_assign(), free_block(), free_call(), free_case(), free_close(), free_commit(), free_dynexecute(), free_dynfors(), free_execsql(), free_exit(), free_fetch(), free_forc(), free_foreach_a(), free_fori(), free_fors(), free_getdiag(), free_if(), free_loop(), free_open(), free_perform(), free_raise(), free_return(), free_return_next(), free_return_query(), free_rollback(), free_while(), PLPGSQL_STMT_ASSERT, PLPGSQL_STMT_ASSIGN, PLPGSQL_STMT_BLOCK, PLPGSQL_STMT_CALL, PLPGSQL_STMT_CASE, PLPGSQL_STMT_CLOSE, PLPGSQL_STMT_COMMIT, PLPGSQL_STMT_DYNEXECUTE, PLPGSQL_STMT_DYNFORS, PLPGSQL_STMT_EXECSQL, PLPGSQL_STMT_EXIT, PLPGSQL_STMT_FETCH, PLPGSQL_STMT_FORC, PLPGSQL_STMT_FOREACH_A, PLPGSQL_STMT_FORI, PLPGSQL_STMT_FORS, PLPGSQL_STMT_GETDIAG, PLPGSQL_STMT_IF, PLPGSQL_STMT_LOOP, PLPGSQL_STMT_OPEN, PLPGSQL_STMT_PERFORM, PLPGSQL_STMT_RAISE, PLPGSQL_STMT_RETURN, PLPGSQL_STMT_RETURN_NEXT, PLPGSQL_STMT_RETURN_QUERY, PLPGSQL_STMT_ROLLBACK, PLPGSQL_STMT_WHILE, and stmt.
Referenced by free_stmts().
|
static |
Definition at line 469 of file pl_funcs.c.
References free_stmt(), and lfirst.
Referenced by free_block(), free_case(), free_dynfors(), free_forc(), free_foreach_a(), free_fori(), free_fors(), free_if(), free_loop(), and free_while().
|
static |
Definition at line 542 of file pl_funcs.c.
References free_expr(), free_stmts(), and stmt.
Referenced by free_stmt().
void plpgsql_dumptree | ( | PLpgSQL_function * | func | ) |
Definition at line 1600 of file pl_funcs.c.
References PLpgSQL_function::action, PLpgSQL_type::atttypmod, PLpgSQL_var::cursor_explicit_argrow, PLpgSQL_var::cursor_explicit_expr, PLpgSQL_var::datatype, PLpgSQL_function::datums, PLpgSQL_var::default_val, PLpgSQL_datum::dtype, PLpgSQL_rec::dtype, dump_block(), dump_expr(), dump_indent, fflush(), PLpgSQL_row::fieldnames, PLpgSQL_function::fn_signature, i, PLpgSQL_var::isconst, j, PLpgSQL_stmt_block::lineno, PLpgSQL_function::ndatums, PLpgSQL_row::nfields, PLpgSQL_var::notnull, PLPGSQL_DTYPE_PROMISE, PLPGSQL_DTYPE_REC, PLPGSQL_DTYPE_RECFIELD, PLPGSQL_DTYPE_ROW, PLPGSQL_DTYPE_VAR, PLPGSQL_PROMISE_NONE, printf, PLpgSQL_var::promise, PLpgSQL_var::refname, PLpgSQL_row::refname, generate_unaccent_rules::stdout, PLpgSQL_type::typname, PLpgSQL_type::typoid, and PLpgSQL_row::varnos.
Referenced by do_compile().
void plpgsql_free_function_memory | ( | PLpgSQL_function * | func | ) |
Definition at line 727 of file pl_funcs.c.
References PLpgSQL_function::action, Assert, PLpgSQL_var::cursor_explicit_expr, PLpgSQL_function::datums, PLpgSQL_var::default_val, PLpgSQL_rec::default_val, PLpgSQL_datum::dtype, elog, ERROR, PLpgSQL_function::fn_cxt, free_block(), free_expr(), i, MemoryContextDelete(), PLpgSQL_function::ndatums, PLPGSQL_DTYPE_PROMISE, PLPGSQL_DTYPE_REC, PLPGSQL_DTYPE_RECFIELD, PLPGSQL_DTYPE_ROW, PLPGSQL_DTYPE_VAR, and PLpgSQL_function::use_count.
Referenced by delete_function(), and plpgsql_inline_handler().
const char* plpgsql_getdiag_kindname | ( | PLpgSQL_getdiag_kind | kind | ) |
Definition at line 300 of file pl_funcs.c.
References PLPGSQL_GETDIAG_COLUMN_NAME, PLPGSQL_GETDIAG_CONSTRAINT_NAME, PLPGSQL_GETDIAG_CONTEXT, PLPGSQL_GETDIAG_DATATYPE_NAME, PLPGSQL_GETDIAG_ERROR_CONTEXT, PLPGSQL_GETDIAG_ERROR_DETAIL, PLPGSQL_GETDIAG_ERROR_HINT, PLPGSQL_GETDIAG_MESSAGE_TEXT, PLPGSQL_GETDIAG_RETURNED_SQLSTATE, PLPGSQL_GETDIAG_ROUTINE_OID, PLPGSQL_GETDIAG_ROW_COUNT, PLPGSQL_GETDIAG_SCHEMA_NAME, and PLPGSQL_GETDIAG_TABLE_NAME.
Referenced by dump_getdiag().
void plpgsql_ns_additem | ( | PLpgSQL_nsitem_type | itemtype, |
int | itemno, | ||
const char * | name | ||
) |
Definition at line 92 of file pl_funcs.c.
References Assert, PLpgSQL_nsitem::itemno, PLpgSQL_nsitem::itemtype, name, PLpgSQL_nsitem::name, ns_top, palloc(), PLPGSQL_NSTYPE_LABEL, and PLpgSQL_nsitem::prev.
Referenced by add_parameter_name(), plpgsql_build_record(), plpgsql_build_variable(), and plpgsql_ns_push().
PLpgSQL_nsitem* plpgsql_ns_find_nearest_loop | ( | PLpgSQL_nsitem * | ns_cur | ) |
Definition at line 214 of file pl_funcs.c.
References PLpgSQL_nsitem::itemno, PLpgSQL_nsitem::itemtype, PLPGSQL_LABEL_LOOP, PLPGSQL_NSTYPE_LABEL, and PLpgSQL_nsitem::prev.
void plpgsql_ns_init | ( | void | ) |
Definition at line 43 of file pl_funcs.c.
References ns_top.
Referenced by do_compile(), and plpgsql_compile_inline().
PLpgSQL_nsitem* plpgsql_ns_lookup | ( | PLpgSQL_nsitem * | ns_cur, |
bool | localmode, | ||
const char * | name1, | ||
const char * | name2, | ||
const char * | name3, | ||
int * | names_used | ||
) |
Definition at line 130 of file pl_funcs.c.
References PLpgSQL_nsitem::itemtype, PLpgSQL_nsitem::name, PLPGSQL_NSTYPE_LABEL, PLPGSQL_NSTYPE_VAR, and PLpgSQL_nsitem::prev.
Referenced by add_parameter_name(), plpgsql_param_ref(), plpgsql_parse_cwordtype(), plpgsql_parse_dblword(), plpgsql_parse_tripword(), plpgsql_parse_word(), plpgsql_parse_wordtype(), and resolve_column_ref().
PLpgSQL_nsitem* plpgsql_ns_lookup_label | ( | PLpgSQL_nsitem * | ns_cur, |
const char * | name | ||
) |
Definition at line 195 of file pl_funcs.c.
References PLpgSQL_nsitem::itemtype, name, PLpgSQL_nsitem::name, PLPGSQL_NSTYPE_LABEL, and PLpgSQL_nsitem::prev.
void plpgsql_ns_pop | ( | void | ) |
Definition at line 67 of file pl_funcs.c.
References Assert, PLpgSQL_nsitem::itemtype, ns_top, PLPGSQL_NSTYPE_LABEL, and PLpgSQL_nsitem::prev.
void plpgsql_ns_push | ( | const char * | label, |
PLpgSQL_label_type | label_type | ||
) |
Definition at line 54 of file pl_funcs.c.
References label, plpgsql_ns_additem(), and PLPGSQL_NSTYPE_LABEL.
Referenced by do_compile(), and plpgsql_compile_inline().
PLpgSQL_nsitem* plpgsql_ns_top | ( | void | ) |
Definition at line 81 of file pl_funcs.c.
References ns_top.
Referenced by add_parameter_name(), plpgsql_parse_cwordtype(), plpgsql_parse_dblword(), plpgsql_parse_tripword(), plpgsql_parse_word(), and plpgsql_parse_wordtype().
const char* plpgsql_stmt_typename | ( | PLpgSQL_stmt * | stmt | ) |
Definition at line 232 of file pl_funcs.c.
References _, PLPGSQL_STMT_ASSERT, PLPGSQL_STMT_ASSIGN, PLPGSQL_STMT_BLOCK, PLPGSQL_STMT_CALL, PLPGSQL_STMT_CASE, PLPGSQL_STMT_CLOSE, PLPGSQL_STMT_COMMIT, PLPGSQL_STMT_DYNEXECUTE, PLPGSQL_STMT_DYNFORS, PLPGSQL_STMT_EXECSQL, PLPGSQL_STMT_EXIT, PLPGSQL_STMT_FETCH, PLPGSQL_STMT_FORC, PLPGSQL_STMT_FOREACH_A, PLPGSQL_STMT_FORI, PLPGSQL_STMT_FORS, PLPGSQL_STMT_GETDIAG, PLPGSQL_STMT_IF, PLPGSQL_STMT_LOOP, PLPGSQL_STMT_OPEN, PLPGSQL_STMT_PERFORM, PLPGSQL_STMT_RAISE, PLPGSQL_STMT_RETURN, PLPGSQL_STMT_RETURN_NEXT, PLPGSQL_STMT_RETURN_QUERY, PLPGSQL_STMT_ROLLBACK, PLPGSQL_STMT_WHILE, and stmt.
Referenced by plpgsql_exec_error_callback().
|
static |
Definition at line 786 of file pl_funcs.c.
Referenced by dump_assert(), dump_case(), dump_cursor_direction(), dump_dynexecute(), dump_dynfors(), dump_execsql(), dump_fetch(), dump_forc(), dump_fori(), dump_ind(), dump_open(), dump_raise(), dump_return_query(), dump_stmts(), and plpgsql_dumptree().
|
static |
Definition at line 35 of file pl_funcs.c.
Referenced by plpgsql_ns_additem(), plpgsql_ns_init(), plpgsql_ns_pop(), and plpgsql_ns_top().