|
PostgreSQL Source Code git master
|
#include "commands/trigger.h"#include "lib/ilist.h"#include "parser/parser.h"#include "utils/portal.h"

Go to the source code of this file.
Data Structures | |
| struct | SPITupleTable |
| struct | SPIPrepareOptions |
| struct | SPIExecuteOptions |
| struct | SPIParseOpenOptions |
Variables | |
| PGDLLIMPORT uint64 | SPI_processed |
| PGDLLIMPORT SPITupleTable * | SPI_tuptable |
| PGDLLIMPORT int | SPI_result |
|
extern |
Definition at line 482 of file spi.c.
References _SPI_connected, _SPI_current, _SPI_stack, ereport, errcode(), errhint(), errmsg(), _SPI_connection::execCxt, _SPI_connection::execSubid, fb(), InvalidSubTransactionId, MemoryContextDelete(), MemoryContextReset(), next, slist_container, slist_delete_current(), slist_foreach_modify, SPI_processed, SPI_result, SPI_tuptable, SPITupleTable::subid, SPITupleTable::tuptabcxt, _SPI_connection::tuptable, _SPI_connection::tuptables, and WARNING.
Referenced by AbortSubTransaction(), and CommitSubTransaction().
Definition at line 428 of file spi.c.
References _SPI_connected, _SPI_current, _SPI_stack, ereport, errcode(), errhint(), errmsg(), fb(), SPI_processed, SPI_result, SPI_tuptable, and WARNING.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
Definition at line 320 of file spi.c.
References _SPI_commit().
Referenced by exec_stmt_commit(), plperl_spi_commit(), pltcl_commit(), and PLy_commit().
Definition at line 94 of file spi.c.
References SPI_connect_ext().
Referenced by check_foreign_key(), check_primary_key(), connectby(), crosstab(), cursor_to_xml(), cursor_to_xmlschema(), database_to_xml_internal(), database_to_xmlschema_internal(), get_crosstab_tuplestore(), get_tuple_of_interest(), initialize_worker_spi(), load_categories_hash(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_event_trigger_handler(), plperl_trigger_handler(), plpgsql_validator(), plsample_trigger_handler(), pltcl_event_trigger_handler(), pltcl_trigger_handler(), query_to_xml_and_xmlschema(), query_to_xml_internal(), query_to_xmlschema(), refresh_by_match_merge(), ri_Check_Pk_Match(), RI_FKey_cascade_del(), RI_FKey_cascade_upd(), RI_FKey_check(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_restrict(), ri_set(), schema_to_xml_internal(), schema_to_xmlschema_internal(), test_predtest(), ts_stat1(), ts_stat2(), tsquery_rewrite_query(), worker_spi_main(), and xpath_table().
Definition at line 100 of file spi.c.
References _SPI_connected, _SPI_current, _SPI_stack, _SPI_stack_depth, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, _SPI_connection::atomic, _SPI_connection::connectSubid, elog, ERROR, _SPI_connection::execCxt, _SPI_connection::execSubid, false, fb(), GetCurrentSubTransactionId(), _SPI_connection::internal_xact, InvalidSubTransactionId, MemoryContextAlloc(), MemoryContextSwitchTo(), _SPI_connection::outer_processed, _SPI_connection::outer_result, _SPI_connection::outer_tuptable, PortalContext, _SPI_connection::procCxt, _SPI_connection::processed, _SPI_connection::queryEnv, repalloc(), _SPI_connection::savedcxt, slist_init(), SPI_OK_CONNECT, SPI_OPT_NONATOMIC, SPI_processed, SPI_result, SPI_tuptable, TopMemoryContext, TopTransactionContext, _SPI_connection::tuptable, and _SPI_connection::tuptables.
Referenced by plperl_func_handler(), plperl_inline_handler(), plpgsql_call_handler(), plpgsql_inline_handler(), plpython3_call_handler(), plpython3_inline_handler(), pltcl_func_handler(), and SPI_connect().
Definition at line 1047 of file spi.c.
References _SPI_current, fb(), heap_copytuple(), MemoryContextSwitchTo(), _SPI_connection::savedcxt, SPI_ERROR_ARGUMENT, SPI_ERROR_UNCONNECTED, and SPI_result.
Referenced by get_tuple_of_interest(), and plpgsql_exec_trigger().
Definition at line 1862 of file spi.c.
References elog, ERROR, PortalDrop(), and PortalIsValid.
Referenced by exec_stmt_close(), exec_stmt_dynfors(), exec_stmt_forc(), exec_stmt_fors(), plperl_spi_cursor_close(), plperl_spi_fetchrow(), PLy_cursor_close(), PLy_cursor_dealloc(), query_to_xml_and_xmlschema(), query_to_xmlschema(), ts_stat_sql(), and tsquery_rewrite_query().
Definition at line 1806 of file spi.c.
References _SPI_cursor_operation(), CreateDestReceiver(), DestSPI, fb(), FETCH_BACKWARD, and FETCH_FORWARD.
Referenced by cursor_to_xml(), exec_for_query(), plperl_spi_fetchrow(), PLy_cursor_fetch(), PLy_cursor_iternext(), ts_stat_sql(), and tsquery_rewrite_query().
Definition at line 1794 of file spi.c.
References GetPortalByName(), and name.
Referenced by cursor_to_xml(), cursor_to_xmlschema(), exec_stmt_close(), exec_stmt_fetch(), exec_stmt_forc(), exec_stmt_open(), plperl_spi_cursor_close(), and plperl_spi_fetchrow().
Definition at line 1821 of file spi.c.
References _SPI_cursor_operation(), fb(), FETCH_BACKWARD, FETCH_FORWARD, and None_Receiver.
|
extern |
Definition at line 1445 of file spi.c.
References _SPI_convert_params(), fb(), name, Nulls, pfree(), plan, and SPI_cursor_open_internal().
Referenced by plperl_spi_query(), plperl_spi_query_prepared(), PLy_cursor_plan(), PLy_cursor_query(), query_to_xml_and_xmlschema(), query_to_xmlschema(), ts_stat_sql(), and tsquery_rewrite_query().
|
extern |
Definition at line 1472 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), elog, ERROR, fb(), name, Nulls, plan, RAW_PARSE_DEFAULT, SPI_cursor_open_internal(), and SPI_result.
|
extern |
Definition at line 1525 of file spi.c.
References name, plan, and SPI_cursor_open_internal().
Referenced by exec_run_select(), exec_stmt_forc(), and exec_stmt_open().
|
extern |
Definition at line 1533 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), elog, ERROR, fb(), name, plan, RAW_PARSE_DEFAULT, SPI_cursor_open_internal(), and SPI_result.
Referenced by exec_dynquery_with_params().
Definition at line 1361 of file spi.c.
References _SPI_current, datumTransfer(), elog, ERROR, fb(), MemoryContextSwitchTo(), _SPI_connection::savedcxt, and value.
Referenced by coerce_function_result_tuple(), and plpgsql_exec_function().
Definition at line 630 of file spi.c.
References SPI_execute().
Referenced by get_tuple_of_interest(), refresh_by_match_merge(), and xpath_table().
Definition at line 704 of file spi.c.
References fb(), Nulls, plan, and SPI_execute_plan().
Referenced by check_foreign_key(), and check_primary_key().
Definition at line 596 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, _SPI_prepare_oneshot_plan(), CURSOR_OPT_PARALLEL_OK, fb(), InvalidSnapshot, plan, RAW_PARSE_DEFAULT, and SPI_ERROR_ARGUMENT.
Referenced by build_tuplestore_recursively(), crosstab(), get_crosstab_tuplestore(), initialize_worker_spi(), load_categories_hash(), plperl_spi_exec(), pltcl_SPI_execute(), PLy_spi_execute_query(), query_to_oid_list(), query_to_xml_internal(), refresh_by_match_merge(), SPI_exec(), and worker_spi_main().
|
extern |
Definition at line 637 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, _SPI_prepare_oneshot_plan(), CURSOR_OPT_PARALLEL_OK, fb(), InvalidSnapshot, plan, RAW_PARSE_DEFAULT, and SPI_ERROR_ARGUMENT.
Referenced by exec_stmt_dynexecute(), and exec_stmt_return_query().
|
extern |
Definition at line 672 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, fb(), InvalidSnapshot, Nulls, plan, SPI_ERROR_ARGUMENT, and SPI_ERROR_PARAM.
Referenced by pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_spi_exec_prepared(), pltcl_SPI_execute_plan(), PLy_spi_execute_plan(), SPI_execp(), and test_predtest().
|
extern |
Definition at line 711 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, fb(), InvalidSnapshot, plan, and SPI_ERROR_ARGUMENT.
Referenced by exec_stmt_call(), and exec_stmt_return_query().
|
extern |
Definition at line 733 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, fb(), InvalidSnapshot, plan, and SPI_ERROR_ARGUMENT.
Referenced by exec_run_select(), and exec_stmt_execsql().
|
extern |
Definition at line 773 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, fb(), Nulls, plan, SPI_ERROR_ARGUMENT, and SPI_ERROR_PARAM.
Referenced by RI_Initial_Check(), RI_PartitionRemove_Check(), and ri_PerformCheck().
|
extern |
Definition at line 812 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, _SPI_prepare_oneshot_plan(), CURSOR_OPT_PARALLEL_OK, fb(), InvalidSnapshot, Nulls, plan, RAW_PARSE_DEFAULT, SPI_ERROR_ARGUMENT, and SPI_ERROR_PARAM.
Definition at line 182 of file spi.c.
References _SPI_begin_call(), _SPI_connected, _SPI_current, _SPI_stack, _SPI_connection::execCxt, fb(), MemoryContextDelete(), MemoryContextSwitchTo(), _SPI_connection::outer_processed, _SPI_connection::outer_result, _SPI_connection::outer_tuptable, _SPI_connection::procCxt, _SPI_connection::savedcxt, SPI_OK_FINISH, SPI_processed, SPI_result, and SPI_tuptable.
Referenced by check_foreign_key(), check_primary_key(), connectby(), crosstab(), cursor_to_xml(), cursor_to_xmlschema(), database_to_xml_internal(), database_to_xmlschema_internal(), get_crosstab_tuplestore(), get_tuple_of_interest(), initialize_worker_spi(), load_categories_hash(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_event_trigger_handler(), plperl_func_handler(), plperl_inline_handler(), plperl_trigger_handler(), plpgsql_call_handler(), plpgsql_inline_handler(), plpgsql_validator(), plsample_trigger_handler(), pltcl_event_trigger_handler(), pltcl_func_handler(), pltcl_trigger_handler(), PLy_exec_event_trigger(), PLy_exec_function(), PLy_exec_trigger(), query_to_xml_and_xmlschema(), query_to_xml_internal(), query_to_xmlschema(), refresh_by_match_merge(), ri_Check_Pk_Match(), RI_FKey_cascade_del(), RI_FKey_cascade_upd(), RI_FKey_check(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_restrict(), ri_set(), schema_to_xml_internal(), schema_to_xmlschema_internal(), test_predtest(), ts_stat1(), ts_stat2(), tsquery_rewrite_query(), worker_spi_main(), and xpath_table().
Definition at line 1198 of file spi.c.
References fb(), FirstLowInvalidHeapAttributeNumber, FormData_pg_attribute, NameStr, TupleDescData::natts, pstrdup(), SPI_ERROR_NOATTRIBUTE, SPI_result, SystemAttributeDefinition(), and TupleDescAttr().
Referenced by get_pkey_attnames(), and SPI_sql_row_to_xmlelement().
Definition at line 1175 of file spi.c.
References fb(), FormData_pg_attribute, namestrcmp(), TupleDescData::natts, SPI_ERROR_NOATTRIBUTE, SystemAttributeByName(), and TupleDescAttr().
Referenced by autoinc(), check_foreign_key(), check_primary_key(), insert_username(), lo_manage(), make_ruledef(), make_viewdef(), moddatetime(), plperl_build_tuple_result(), plperl_modify_tuple(), pltcl_build_tuple_result(), PLy_modify_tuple(), and tsvector_update_trigger().
|
extern |
Definition at line 1025 of file spi.c.
References _SPI_PLAN_MAGIC, DropCachedPlan(), fb(), lfirst, MemoryContextDelete(), plan, and SPI_ERROR_ARGUMENT.
Referenced by free_expr(), plperl_spi_freeplan(), plperl_spi_prepare(), plperl_spi_query(), PLy_cursor_query(), PLy_plan_dealloc(), ri_FetchPreparedPlan(), ts_stat_sql(), and tsquery_rewrite_query().
Definition at line 1379 of file spi.c.
References heap_freetuple().
|
extern |
Definition at line 1386 of file spi.c.
References _SPI_current, elog, fb(), MemoryContextDelete(), next, slist_container, slist_delete_current(), slist_foreach_modify, SPI_tuptable, SPITupleTable::tuptabcxt, _SPI_connection::tuptable, _SPI_connection::tuptables, and WARNING.
Referenced by _SPI_execute_plan(), exec_eval_cleanup(), exec_for_query(), exec_stmt_call(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), plperl_spi_execute_fetch_result(), plperl_spi_fetchrow(), pltcl_process_SPI_result(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_spi_execute_fetch_result(), ts_stat_sql(), and tsquery_rewrite_query().
|
extern |
Definition at line 1890 of file spi.c.
References _SPI_PLAN_MAGIC, fb(), plan, SPI_ERROR_ARGUMENT, and SPI_result.
|
extern |
Definition at line 1875 of file spi.c.
References _SPI_PLAN_MAGIC, fb(), InvalidOid, plan, SPI_ERROR_ARGUMENT, and SPI_result.
Definition at line 1252 of file spi.c.
References FirstLowInvalidHeapAttributeNumber, heap_getattr(), TupleDescData::natts, SPI_ERROR_NOATTRIBUTE, and SPI_result.
Referenced by autoinc(), check_foreign_key(), check_primary_key(), exec_eval_expr(), initialize_worker_spi(), make_ruledef(), make_viewdef(), query_to_oid_list(), SPI_sql_row_to_xmlelement(), test_predtest(), ts_stat_sql(), tsquery_rewrite_query(), tsvector_update_trigger(), and worker_spi_main().
Definition at line 1332 of file spi.c.
References get_namespace_name(), and RelationGetNamespace.
Referenced by plperl_trigger_build_args(), plsample_trigger_handler(), pltcl_trigger_handler(), and PLy_trigger_build_args().
Definition at line 1326 of file spi.c.
References pstrdup(), and RelationGetRelationName.
Referenced by autoinc(), check_foreign_key(), check_primary_key(), insert_username(), moddatetime(), plperl_trigger_build_args(), plsample_trigger_handler(), pltcl_trigger_handler(), and PLy_trigger_build_args().
Definition at line 1268 of file spi.c.
References fb(), FirstLowInvalidHeapAttributeNumber, GETSTRUCT(), HeapTupleIsValid, NameStr, TupleDescData::natts, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), SearchSysCache1(), SPI_ERROR_NOATTRIBUTE, SPI_ERROR_TYPUNKNOWN, SPI_result, SystemAttributeDefinition(), TupleDescAttr(), and typname.
Referenced by check_foreign_key().
Definition at line 1308 of file spi.c.
References FirstLowInvalidHeapAttributeNumber, InvalidOid, TupleDescData::natts, SPI_ERROR_NOATTRIBUTE, SPI_result, SystemAttributeDefinition(), and TupleDescAttr().
Referenced by autoinc(), check_foreign_key(), check_primary_key(), insert_username(), moddatetime(), SPI_sql_row_to_xmlelement(), ts_stat_sql(), tsquery_rewrite_query(), and tsvector_update_trigger().
Definition at line 1220 of file spi.c.
References fb(), FirstLowInvalidHeapAttributeNumber, getTypeOutputInfo(), heap_getattr(), TupleDescData::natts, OidOutputFunctionCall(), SPI_ERROR_NOATTRIBUTE, SPI_result, SystemAttributeDefinition(), TupleDescAttr(), and val.
Referenced by build_tuplestore_recursively(), check_foreign_key(), crosstab(), get_crosstab_tuplestore(), get_sql_insert(), get_sql_update(), lo_manage(), load_categories_hash(), make_ruledef(), make_viewdef(), refresh_by_match_merge(), triggered_change_notification(), and xpath_table().
Definition at line 581 of file spi.c.
References _SPI_current, _SPI_connection::atomic, fb(), and IsSubTransaction().
Referenced by StartTransaction().
|
extern |
Definition at line 1910 of file spi.c.
References _SPI_PLAN_MAGIC, fb(), linitial, list_length(), plan, CachedPlanSource::resultDesc, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by SPI_cursor_open_internal().
|
extern |
Definition at line 976 of file spi.c.
References _SPI_PLAN_MAGIC, CacheMemoryContext, fb(), lfirst, MemoryContextSetParent(), plan, SaveCachedPlan(), and SPI_ERROR_ARGUMENT.
Referenced by check_foreign_key(), check_primary_key(), exec_prepare_plan(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_spi_prepare(), pltcl_SPI_prepare(), PLy_spi_prepare(), and ri_PlanCheck().
|
extern |
Definition at line 1106 of file spi.c.
References _SPI_current, attnum, fb(), heap_deform_tuple(), heap_form_tuple(), i, MemoryContextSwitchTo(), TupleDescData::natts, Nulls, palloc_array, pfree(), RelationData::rd_att, _SPI_connection::savedcxt, SPI_ERROR_ARGUMENT, SPI_ERROR_NOATTRIBUTE, SPI_ERROR_UNCONNECTED, SPI_result, HeapTupleHeaderData::t_ctid, HeapTupleData::t_data, HeapTupleData::t_self, and HeapTupleData::t_tableOid.
Definition at line 1338 of file spi.c.
References _SPI_current, elog, ERROR, fb(), MemoryContextAlloc(), and _SPI_connection::savedcxt.
Referenced by _SPI_strdup(), and coerce_function_result_tuple().
|
extern |
Definition at line 2076 of file spi.c.
References _SPI_current, _SPI_error_callback(), _SPI_PLAN_MAGIC, Assert, CurrentResourceOwner, error_context_stack, fb(), GetCachedPlan(), CachedPlanSource::gplan, linitial, list_length(), plan, ErrorContextCallback::previous, CachedPlanSource::query_string, and _SPI_connection::queryEnv.
Referenced by exec_eval_simple_expr(), exec_simple_check_plan(), make_callstmt_target(), and test_predtest().
|
extern |
Definition at line 2057 of file spi.c.
References _SPI_PLAN_MAGIC, Assert, and plan.
Referenced by exec_is_simple_query(), exec_simple_check_plan(), and exec_stmt_execsql().
|
extern |
Definition at line 1948 of file spi.c.
References _SPI_PLAN_MAGIC, Assert, CachedPlanIsValid(), fb(), lfirst, and plan.
Referenced by ri_FetchPreparedPlan().
|
extern |
Definition at line 860 of file spi.c.
References SPI_prepare_cursor().
Referenced by check_foreign_key(), check_primary_key(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_spi_prepare(), plperl_spi_query(), pltcl_SPI_prepare(), PLy_cursor_query(), PLy_spi_prepare(), query_to_xml_and_xmlschema(), query_to_xmlschema(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_PlanCheck(), test_predtest(), ts_stat_sql(), and tsquery_rewrite_query().
|
extern |
Definition at line 866 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_make_plan_non_temp(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), fb(), plan, RAW_PARSE_DEFAULT, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by SPI_prepare().
|
extern |
Definition at line 902 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_make_plan_non_temp(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), fb(), plan, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by exec_prepare_plan().
|
extern |
Definition at line 938 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_make_plan_non_temp(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), fb(), plan, RAW_PARSE_DEFAULT, SPI_ERROR_ARGUMENT, and SPI_result.
|
extern |
Definition at line 3296 of file spi.c.
References _SPI_begin_call(), _SPI_current, _SPI_end_call(), _SPI_find_ENR_by_name(), create_queryEnv(), fb(), _SPI_connection::queryEnv, register_ENR(), SPI_ERROR_ARGUMENT, SPI_ERROR_REL_DUPLICATE, and SPI_OK_REL_REGISTER.
Referenced by SPI_register_trigger_data().
|
extern |
Definition at line 3363 of file spi.c.
References ENR_NAMED_TUPLESTORE, fb(), palloc_object, SPI_ERROR_ARGUMENT, SPI_OK_REL_REGISTER, SPI_OK_TD_REGISTER, SPI_register_relation(), and tuplestore_tuple_count().
Referenced by plperl_trigger_handler(), plpgsql_exec_trigger(), plsample_trigger_handler(), pltcl_trigger_handler(), and PLy_exec_trigger().
Definition at line 1347 of file spi.c.
References repalloc().
Definition at line 1972 of file spi.c.
References buf, SPI_ERROR_ARGUMENT, SPI_ERROR_CONNECT, SPI_ERROR_COPY, SPI_ERROR_NOATTRIBUTE, SPI_ERROR_NOOUTFUNC, SPI_ERROR_OPUNKNOWN, SPI_ERROR_PARAM, SPI_ERROR_REL_DUPLICATE, SPI_ERROR_REL_NOT_FOUND, SPI_ERROR_TRANSACTION, SPI_ERROR_TYPUNKNOWN, SPI_ERROR_UNCONNECTED, SPI_OK_CONNECT, SPI_OK_CURSOR, SPI_OK_DELETE, SPI_OK_DELETE_RETURNING, SPI_OK_FETCH, SPI_OK_FINISH, SPI_OK_INSERT, SPI_OK_INSERT_RETURNING, SPI_OK_MERGE, SPI_OK_MERGE_RETURNING, SPI_OK_REL_REGISTER, SPI_OK_REL_UNREGISTER, SPI_OK_REWRITTEN, SPI_OK_SELECT, SPI_OK_SELINTO, SPI_OK_TD_REGISTER, SPI_OK_UPDATE, SPI_OK_UPDATE_RETURNING, SPI_OK_UTILITY, and sprintf.
Referenced by check_foreign_key(), check_primary_key(), exec_dynquery_with_params(), exec_prepare_plan(), exec_run_select(), exec_stmt_call(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_forc(), exec_stmt_open(), exec_stmt_return_query(), plperl_spi_execute_fetch_result(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), plpgsql_call_handler(), plpgsql_inline_handler(), plpgsql_validator(), pltcl_process_SPI_result(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_execute_plan(), PLy_spi_execute_query(), PLy_spi_prepare(), query_to_oid_list(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_PerformCheck(), and ri_PlanCheck().
|
extern |
Definition at line 1074 of file spi.c.
References _SPI_current, assign_record_type_typmod(), DatumGetHeapTupleHeader, fb(), heap_copy_tuple_as_datum(), MemoryContextSwitchTo(), _SPI_connection::savedcxt, SPI_ERROR_ARGUMENT, SPI_ERROR_UNCONNECTED, SPI_result, TupleDescData::tdtypeid, and TupleDescData::tdtypmod.
Referenced by coerce_function_result_tuple().
Definition at line 413 of file spi.c.
References _SPI_rollback().
Referenced by exec_stmt_rollback(), plperl_spi_rollback(), pltcl_rollback(), and PLy_rollback().
Definition at line 419 of file spi.c.
References _SPI_rollback().
Referenced by exec_stmt_rollback().
|
extern |
Definition at line 1003 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_PLAN_MAGIC, _SPI_save_plan(), fb(), plan, SPI_ERROR_ARGUMENT, and SPI_result.
|
extern |
Definition at line 1835 of file spi.c.
References _SPI_cursor_operation(), CreateDestReceiver(), and DestSPI.
Referenced by exec_stmt_fetch().
|
extern |
Definition at line 1850 of file spi.c.
References _SPI_cursor_operation(), and None_Receiver.
Referenced by exec_stmt_fetch().
Definition at line 3330 of file spi.c.
References _SPI_begin_call(), _SPI_current, _SPI_end_call(), _SPI_find_ENR_by_name(), fb(), EphemeralNamedRelationData::md, name, EphemeralNamedRelationMetadataData::name, _SPI_connection::queryEnv, SPI_ERROR_ARGUMENT, SPI_ERROR_REL_NOT_FOUND, SPI_OK_REL_UNREGISTER, and unregister_ENR().
|
extern |
Definition at line 44 of file spi.c.
Referenced by _SPI_cursor_operation(), _SPI_execute_plan(), AtEOSubXact_SPI(), AtEOXact_SPI(), build_tuplestore_recursively(), check_foreign_key(), check_primary_key(), crosstab(), cursor_to_xml(), exec_for_query(), exec_run_select(), exec_stmt_call(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), get_crosstab_tuplestore(), get_tuple_of_interest(), initialize_worker_spi(), load_categories_hash(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), pltcl_SPI_execute(), pltcl_SPI_execute_plan(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_spi_execute_plan(), PLy_spi_execute_query(), query_to_oid_list(), query_to_xml_internal(), refresh_by_match_merge(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_PerformCheck(), SPI_connect_ext(), SPI_cursor_open_internal(), SPI_finish(), test_predtest(), ts_stat_sql(), tsquery_rewrite_query(), worker_spi_main(), and xpath_table().
|
extern |
Definition at line 46 of file spi.c.
Referenced by AtEOSubXact_SPI(), AtEOXact_SPI(), check_foreign_key(), check_primary_key(), exec_dynquery_with_params(), exec_prepare_plan(), exec_run_select(), exec_stmt_forc(), exec_stmt_open(), plperl_spi_prepare(), plperl_spi_query(), plperl_spi_query_prepared(), PLy_cursor_plan(), PLy_cursor_query(), PLy_spi_prepare(), RI_Initial_Check(), RI_PartitionRemove_Check(), ri_PlanCheck(), SPI_connect_ext(), SPI_copytuple(), SPI_cursor_open_with_args(), SPI_cursor_parse_open(), SPI_finish(), SPI_fname(), SPI_getargcount(), SPI_getargtypeid(), SPI_getbinval(), SPI_gettype(), SPI_gettypeid(), SPI_getvalue(), SPI_is_cursor_plan(), SPI_modifytuple(), SPI_prepare_cursor(), SPI_prepare_extended(), SPI_prepare_params(), SPI_returntuple(), and SPI_saveplan().
|
extern |
Definition at line 45 of file spi.c.
Referenced by _SPI_cursor_operation(), _SPI_execute_plan(), AtEOSubXact_SPI(), AtEOXact_SPI(), build_tuplestore_recursively(), crosstab(), exec_for_query(), exec_run_select(), exec_stmt_call(), exec_stmt_dynexecute(), exec_stmt_execsql(), exec_stmt_fetch(), get_crosstab_tuplestore(), get_tuple_of_interest(), initialize_worker_spi(), load_categories_hash(), pg_get_ruledef_worker(), pg_get_viewdef_worker(), plperl_spi_exec(), plperl_spi_exec_prepared(), plperl_spi_fetchrow(), pltcl_SPI_execute(), pltcl_SPI_execute_plan(), PLy_cursor_fetch(), PLy_cursor_iternext(), PLy_spi_execute_plan(), PLy_spi_execute_query(), query_to_oid_list(), refresh_by_match_merge(), RI_Initial_Check(), RI_PartitionRemove_Check(), SPI_connect_ext(), SPI_cursor_open_internal(), SPI_finish(), SPI_freetuptable(), SPI_sql_row_to_xmlelement(), test_predtest(), ts_stat_sql(), tsquery_rewrite_query(), worker_spi_main(), and xpath_table().