PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "access/printtup.h"
#include "access/sysattr.h"
#include "access/xact.h"
#include "catalog/heap.h"
#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "executor/executor.h"
#include "executor/spi_priv.h"
#include "tcop/pquery.h"
#include "tcop/utility.h"
#include "utils/builtins.h"
#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
struct | SPICallbackArg |
Typedefs | |
typedef struct SPICallbackArg | SPICallbackArg |
Variables | |
uint64 | SPI_processed = 0 |
SPITupleTable * | SPI_tuptable = NULL |
int | SPI_result = 0 |
static _SPI_connection * | _SPI_stack = NULL |
static _SPI_connection * | _SPI_current = NULL |
static int | _SPI_stack_depth = 0 |
static int | _SPI_connected = -1 |
typedef struct SPICallbackArg SPICallbackArg |
|
static |
Definition at line 3077 of file spi.c.
References _SPI_current, _SPI_execmem(), _SPI_connection::execSubid, GetCurrentSubTransactionId(), and SPI_ERROR_UNCONNECTED.
Referenced by _SPI_cursor_operation(), SPI_cursor_open_internal(), SPI_cursor_open_with_args(), SPI_cursor_parse_open(), SPI_execute(), SPI_execute_extended(), SPI_execute_plan(), SPI_execute_plan_extended(), SPI_execute_plan_with_paramlist(), SPI_execute_snapshot(), SPI_execute_with_args(), SPI_finish(), SPI_prepare_cursor(), SPI_prepare_extended(), SPI_prepare_params(), SPI_register_relation(), SPI_saveplan(), and SPI_unregister_relation().
|
static |
Definition at line 3117 of file spi.c.
References _SPI_current, SPITupleTable::numvals, _SPI_connection::processed, and _SPI_connection::tuptable.
Referenced by _SPI_cursor_operation(), and _SPI_pquery().
|
static |
Definition at line 227 of file spi.c.
References _SPI_current, AbortCurrentTransaction(), _SPI_connection::atomic, CommitTransactionCommand(), CopyErrorData(), CurrentMemoryContext, ereport, errcode(), errmsg(), ERROR, FlushErrorState(), ForgetPortalSnapshots(), HoldPinnedPortals(), _SPI_connection::internal_xact, IsSubTransaction(), MemoryContextSwitchTo(), PG_CATCH, PG_END_TRY, PG_TRY, RestoreTransactionCharacteristics(), ReThrowError(), SaveTransactionCharacteristics(), and StartTransactionCommand().
Referenced by SPI_commit(), and SPI_commit_and_chain().
|
static |
Definition at line 2849 of file spi.c.
References i, ParamExternData::isnull, makeParamList(), Nulls, PARAM_FLAG_CONST, ParamListInfoData::params, ParamExternData::pflags, ParamExternData::ptype, and ParamExternData::value.
Referenced by SPI_cursor_open(), SPI_cursor_open_with_args(), SPI_execute_plan(), SPI_execute_snapshot(), and SPI_execute_with_args().
|
static |
Definition at line 3007 of file spi.c.
References _SPI_begin_call(), _SPI_checktuples(), _SPI_current, _SPI_end_call(), generate_unaccent_rules::dest, DestSPI, elog, ERROR, PortalIsValid, PortalRunFetch(), _SPI_connection::processed, SPI_processed, SPI_tuptable, and _SPI_connection::tuptable.
Referenced by SPI_cursor_fetch(), SPI_cursor_move(), SPI_scroll_cursor_fetch(), and SPI_scroll_cursor_move().
|
static |
Definition at line 3101 of file spi.c.
References _SPI_current, _SPI_procmem(), _SPI_connection::execCxt, _SPI_connection::execSubid, InvalidSubTransactionId, and MemoryContextReset().
Referenced by _SPI_cursor_operation(), SPI_cursor_open_internal(), SPI_cursor_open_with_args(), SPI_cursor_parse_open(), SPI_execute(), SPI_execute_extended(), SPI_execute_plan(), SPI_execute_plan_extended(), SPI_execute_plan_with_paramlist(), SPI_execute_snapshot(), SPI_execute_with_args(), SPI_prepare_cursor(), SPI_prepare_extended(), SPI_prepare_params(), SPI_register_relation(), SPI_saveplan(), and SPI_unregister_relation().
|
static |
Definition at line 2961 of file spi.c.
References arg, errcontext, errposition(), geterrposition(), internalerrposition(), internalerrquery(), SPICallbackArg::mode, SPICallbackArg::query, RAW_PARSE_PLPGSQL_ASSIGN1, RAW_PARSE_PLPGSQL_ASSIGN2, RAW_PARSE_PLPGSQL_ASSIGN3, and RAW_PARSE_PLPGSQL_EXPR.
Referenced by _SPI_execute_plan(), _SPI_prepare_oneshot_plan(), _SPI_prepare_plan(), SPI_cursor_open_internal(), and SPI_plan_get_cached_plan().
|
static |
Definition at line 3058 of file spi.c.
References _SPI_current, _SPI_connection::execCxt, and MemoryContextSwitchTo().
Referenced by _SPI_begin_call().
|
static |
Definition at line 2399 of file spi.c.
References _SPI_current, _SPI_error_callback(), _SPI_pquery(), ActiveSnapshotSet(), ErrorContextCallback::arg, Assert, _SPI_connection::atomic, ErrorContextCallback::callback, CommandCounterIncrement(), CommandIsReadOnly(), QueryCompletion::commandTag, CachedPlanSource::commandTag, CompleteCachedPlan(), context, CreateCommandName(), CreateDestReceiver(), CreateQueryDesc(), CurrentResourceOwner, generate_unaccent_rules::dest, DestNone, DestSPI, EnsurePortalSnapshotExists(), ereport, errcode(), errmsg(), ERROR, error_context_stack, CopyStmt::filename, FreeQueryDesc(), GetActiveSnapshot(), GetCachedPlan(), GetCommandTagName(), GetTransactionSnapshot(), if(), CreateTableAsStmt::if_not_exists, InitializeQueryCompletion(), CreateTableAsStmt::into, InvalidSnapshot, CreateTableAsStmt::is_select_into, IsA, IsSubTransaction(), lfirst, lfirst_node, linitial_node, list_length(), SPICallbackArg::mode, NIL, QueryCompletion::nprocessed, SPITupleTable::numvals, pg_analyze_and_rewrite_fixedparams(), pg_analyze_and_rewrite_withcb(), plan, PlannedStmtRequiresSnapshot(), PopActiveSnapshot(), ErrorContextCallback::previous, PROCESS_UTILITY_QUERY, PROCESS_UTILITY_QUERY_NONATOMIC, _SPI_connection::processed, ProcessUtility(), PushActiveSnapshot(), PushCopiedSnapshot(), SPICallbackArg::query, CachedPlanSource::query_string, _SPI_connection::queryEnv, CachedPlanSource::raw_parse_tree, ReleaseCachedPlan(), res, CachedPlanSource::resultDesc, IntoClause::skipData, SPI_ERROR_COPY, SPI_ERROR_TRANSACTION, SPI_freetuptable(), SPI_OK_REWRITTEN, SPI_OK_SELINTO, SPI_OK_UTILITY, SPI_processed, SPI_tuptable, stmt, CachedPlan::stmt_list, _SPI_connection::tuptable, and UpdateActiveSnapshotCommandId().
Referenced by SPI_execute(), SPI_execute_extended(), SPI_execute_plan(), SPI_execute_plan_extended(), SPI_execute_plan_with_paramlist(), SPI_execute_snapshot(), and SPI_execute_with_args().
|
static |
Definition at line 3280 of file spi.c.
References _SPI_current, Assert, get_ENR(), name, and _SPI_connection::queryEnv.
Referenced by SPI_register_relation(), and SPI_unregister_relation().
|
static |
Definition at line 3141 of file spi.c.
References _SPI_current, _SPI_PLAN_MAGIC, ALLOCSET_SMALL_SIZES, AllocSetContextCreate, _SPI_plan::argtypes, Assert, CachedPlanSetParentContext(), _SPI_plan::cursor_options, lappend(), lfirst, _SPI_plan::magic, MemoryContextSwitchTo(), _SPI_plan::nargs, NIL, palloc(), palloc0(), _SPI_plan::parse_mode, _SPI_plan::parserSetup, _SPI_plan::parserSetupArg, plan, _SPI_plan::plancache_list, _SPI_plan::plancxt, and _SPI_connection::procCxt.
Referenced by SPI_prepare_cursor(), SPI_prepare_extended(), and SPI_prepare_params().
Definition at line 2874 of file spi.c.
References _SPI_checktuples(), _SPI_current, CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_SELECT, CMD_UPDATE, QueryDesc::dest, DestNone, DestSPI, elog, ERROR, EState::es_processed, QueryDesc::estate, EXEC_FLAG_SKIP_TRIGGERS, ExecutorEnd(), ExecutorFinish(), ExecutorRun(), ExecutorStart(), ForwardScanDirection, PlannedStmt::hasReturning, _DestReceiver::mydest, QueryDesc::operation, QueryDesc::plannedstmt, _SPI_connection::processed, res, ResetUsage(), ShowUsage(), SPI_ERROR_OPUNKNOWN, SPI_OK_DELETE, SPI_OK_DELETE_RETURNING, SPI_OK_INSERT, SPI_OK_INSERT_RETURNING, SPI_OK_MERGE, SPI_OK_MERGE_RETURNING, SPI_OK_SELECT, SPI_OK_UPDATE, SPI_OK_UPDATE_RETURNING, and SPI_OK_UTILITY.
Referenced by _SPI_execute_plan().
|
static |
Definition at line 2329 of file spi.c.
References _SPI_error_callback(), ErrorContextCallback::arg, ErrorContextCallback::callback, CreateCommandTag(), CreateOneShotCachedPlan(), error_context_stack, lappend(), lfirst_node, SPICallbackArg::mode, NIL, plan, ErrorContextCallback::previous, SPICallbackArg::query, raw_parser(), and RawStmt::stmt.
Referenced by SPI_execute(), SPI_execute_extended(), and SPI_execute_with_args().
|
static |
Definition at line 2221 of file spi.c.
References _SPI_current, _SPI_error_callback(), ErrorContextCallback::arg, Assert, ErrorContextCallback::callback, CompleteCachedPlan(), CreateCachedPlan(), CreateCommandTag(), error_context_stack, lappend(), lfirst_node, SPICallbackArg::mode, NIL, pg_analyze_and_rewrite_fixedparams(), pg_analyze_and_rewrite_withcb(), plan, ErrorContextCallback::previous, SPICallbackArg::query, _SPI_connection::queryEnv, raw_parser(), and RawStmt::stmt.
Referenced by SPI_cursor_open_with_args(), SPI_cursor_parse_open(), SPI_prepare_cursor(), SPI_prepare_extended(), and SPI_prepare_params().
|
static |
Definition at line 3064 of file spi.c.
References _SPI_current, MemoryContextSwitchTo(), and _SPI_connection::procCxt.
Referenced by _SPI_end_call(), and spi_dest_startup().
|
static |
Definition at line 332 of file spi.c.
References _SPI_current, AbortCurrentTransaction(), _SPI_connection::atomic, CopyErrorData(), CurrentMemoryContext, ereport, errcode(), errmsg(), ERROR, FlushErrorState(), ForgetPortalSnapshots(), HoldPinnedPortals(), _SPI_connection::internal_xact, IsSubTransaction(), MemoryContextSwitchTo(), PG_CATCH, PG_END_TRY, PG_TRY, RestoreTransactionCharacteristics(), ReThrowError(), SaveTransactionCharacteristics(), and StartTransactionCommand().
Referenced by SPI_rollback(), and SPI_rollback_and_chain().
|
static |
Definition at line 3209 of file spi.c.
References _SPI_PLAN_MAGIC, ALLOCSET_SMALL_SIZES, AllocSetContextCreate, _SPI_plan::argtypes, Assert, CacheMemoryContext, CopyCachedPlan(), CurrentMemoryContext, _SPI_plan::cursor_options, lappend(), lfirst, _SPI_plan::magic, MemoryContextSetParent(), MemoryContextSwitchTo(), _SPI_plan::nargs, palloc(), palloc0(), _SPI_plan::parse_mode, _SPI_plan::parserSetup, _SPI_plan::parserSetupArg, plan, _SPI_plan::plancache_list, _SPI_plan::plancxt, SaveCachedPlan(), and _SPI_plan::saved.
Referenced by SPI_saveplan().
void AtEOSubXact_SPI | ( | bool | isCommit, |
SubTransactionId | mySubid | ||
) |
Definition at line 482 of file spi.c.
References _SPI_connected, _SPI_current, _SPI_stack, slist_mutable_iter::cur, ereport, errcode(), errhint(), errmsg(), _SPI_connection::execCxt, _SPI_connection::execSubid, 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().
void AtEOXact_SPI | ( | bool | isCommit | ) |
Definition at line 428 of file spi.c.
References _SPI_connected, _SPI_current, _SPI_stack, ereport, errcode(), errhint(), errmsg(), SPI_processed, SPI_result, SPI_tuptable, and WARNING.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
void SPI_commit | ( | void | ) |
Definition at line 320 of file spi.c.
References _SPI_commit().
Referenced by exec_stmt_commit(), plperl_spi_commit(), pltcl_commit(), and PLy_commit().
void SPI_commit_and_chain | ( | void | ) |
int SPI_connect | ( | void | ) |
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(), ttdummy(), worker_spi_main(), and xpath_table().
int SPI_connect_ext | ( | int | options | ) |
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, 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, 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().
void SPI_cursor_close | ( | Portal | portal | ) |
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, 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().
Portal SPI_cursor_find | ( | const char * | name | ) |
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(), FETCH_BACKWARD, FETCH_FORWARD, and None_Receiver.
Portal SPI_cursor_open | ( | const char * | name, |
SPIPlanPtr | plan, | ||
Datum * | Values, | ||
const char * | Nulls, | ||
bool | read_only | ||
) |
Definition at line 1445 of file spi.c.
References _SPI_convert_params(), 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().
|
static |
Definition at line 1577 of file spi.c.
References _SPI_begin_call(), _SPI_current, _SPI_end_call(), _SPI_error_callback(), ErrorContextCallback::arg, Assert, ErrorContextCallback::callback, CMD_UTILITY, CommandCounterIncrement(), CommandIsReadOnly(), CachedPlanSource::commandTag, copyObject, copyParamList(), CreateCommandName(), CreateNewPortal(), CreatePortal(), CURSOR_OPT_NO_SCROLL, CURSOR_OPT_SCROLL, PortalData::cursorOptions, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, error_context_stack, ExecSupportsBackwardScan(), GetActiveSnapshot(), GetCachedPlan(), GetCommandTagName(), GetTransactionSnapshot(), lfirst_node, linitial, linitial_node, list_length(), MemoryContextStrdup(), MemoryContextSwitchTo(), SPICallbackArg::mode, name, NIL, plan, PORTAL_MULTI_QUERY, PortalData::portalContext, PortalDefineQuery(), PortalStart(), ErrorContextCallback::previous, _SPI_connection::processed, SPICallbackArg::query, CachedPlanSource::query_string, _SPI_connection::queryEnv, PortalData::queryEnv, ReleaseCachedPlan(), SPI_is_cursor_plan(), SPI_processed, SPI_tuptable, CachedPlan::stmt_list, PortalData::strategy, and _SPI_connection::tuptable.
Referenced by SPI_cursor_open(), SPI_cursor_open_with_args(), SPI_cursor_open_with_paramlist(), and SPI_cursor_parse_open().
Portal SPI_cursor_open_with_args | ( | const char * | name, |
const char * | src, | ||
int | nargs, | ||
Oid * | argtypes, | ||
Datum * | Values, | ||
const char * | Nulls, | ||
bool | read_only, | ||
int | cursorOptions | ||
) |
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, name, Nulls, plan, RAW_PARSE_DEFAULT, SPI_cursor_open_internal(), and SPI_result.
Portal SPI_cursor_open_with_paramlist | ( | const char * | name, |
SPIPlanPtr | plan, | ||
ParamListInfo | params, | ||
bool | read_only | ||
) |
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().
Portal SPI_cursor_parse_open | ( | const char * | name, |
const char * | src, | ||
const SPIParseOpenOptions * | options | ||
) |
Definition at line 1533 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_PLAN_MAGIC, _SPI_prepare_plan(), elog, ERROR, 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, MemoryContextSwitchTo(), _SPI_connection::savedcxt, and value.
Referenced by coerce_function_result_tuple(), and plpgsql_exec_function().
void spi_dest_startup | ( | DestReceiver * | self, |
int | operation, | ||
TupleDesc | typeinfo | ||
) |
Definition at line 2123 of file spi.c.
References _SPI_current, _SPI_procmem(), SPITupleTable::alloced, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CreateTupleDescCopy(), CurrentMemoryContext, elog, ERROR, GetCurrentSubTransactionId(), MemoryContextSwitchTo(), SPITupleTable::next, SPITupleTable::numvals, palloc(), palloc0(), slist_push_head(), SPITupleTable::subid, SPITupleTable::tupdesc, SPITupleTable::tuptabcxt, _SPI_connection::tuptable, _SPI_connection::tuptables, and SPITupleTable::vals.
int SPI_exec | ( | const char * | src, |
long | tcount | ||
) |
Definition at line 630 of file spi.c.
References SPI_execute().
Referenced by get_tuple_of_interest(), refresh_by_match_merge(), and xpath_table().
int SPI_execp | ( | SPIPlanPtr | plan, |
Datum * | Values, | ||
const char * | Nulls, | ||
long | tcount | ||
) |
Definition at line 704 of file spi.c.
References Nulls, plan, and SPI_execute_plan().
Referenced by check_foreign_key(), check_primary_key(), and ttdummy().
int SPI_execute | ( | const char * | src, |
bool | read_only, | ||
long | tcount | ||
) |
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, InvalidSnapshot, options, plan, RAW_PARSE_DEFAULT, res, 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().
int SPI_execute_extended | ( | const char * | src, |
const SPIExecuteOptions * | options | ||
) |
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, InvalidSnapshot, plan, RAW_PARSE_DEFAULT, res, and SPI_ERROR_ARGUMENT.
Referenced by exec_stmt_dynexecute(), and exec_stmt_return_query().
int SPI_execute_plan | ( | SPIPlanPtr | plan, |
Datum * | Values, | ||
const char * | Nulls, | ||
bool | read_only, | ||
long | tcount | ||
) |
Definition at line 672 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, InvalidSnapshot, Nulls, options, plan, res, 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().
int SPI_execute_plan_extended | ( | SPIPlanPtr | plan, |
const SPIExecuteOptions * | options | ||
) |
Definition at line 711 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, InvalidSnapshot, plan, res, and SPI_ERROR_ARGUMENT.
Referenced by exec_stmt_call(), and exec_stmt_return_query().
int SPI_execute_plan_with_paramlist | ( | SPIPlanPtr | plan, |
ParamListInfo | params, | ||
bool | read_only, | ||
long | tcount | ||
) |
Definition at line 733 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, InvalidSnapshot, options, plan, res, and SPI_ERROR_ARGUMENT.
Referenced by exec_run_select(), and exec_stmt_execsql().
int SPI_execute_snapshot | ( | SPIPlanPtr | plan, |
Datum * | Values, | ||
const char * | Nulls, | ||
Snapshot | snapshot, | ||
Snapshot | crosscheck_snapshot, | ||
bool | read_only, | ||
bool | fire_triggers, | ||
long | tcount | ||
) |
Definition at line 773 of file spi.c.
References _SPI_begin_call(), _SPI_convert_params(), _SPI_end_call(), _SPI_execute_plan(), _SPI_PLAN_MAGIC, Nulls, options, plan, res, SPI_ERROR_ARGUMENT, and SPI_ERROR_PARAM.
Referenced by RI_Initial_Check(), RI_PartitionRemove_Check(), and ri_PerformCheck().
int SPI_execute_with_args | ( | const char * | src, |
int | nargs, | ||
Oid * | argtypes, | ||
Datum * | Values, | ||
const char * | Nulls, | ||
bool | read_only, | ||
long | tcount | ||
) |
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, InvalidSnapshot, Nulls, options, plan, RAW_PARSE_DEFAULT, res, SPI_ERROR_ARGUMENT, and SPI_ERROR_PARAM.
int SPI_finish | ( | void | ) |
Definition at line 182 of file spi.c.
References _SPI_begin_call(), _SPI_connected, _SPI_current, _SPI_stack, _SPI_connection::execCxt, MemoryContextDelete(), MemoryContextSwitchTo(), _SPI_connection::outer_processed, _SPI_connection::outer_result, _SPI_connection::outer_tuptable, _SPI_connection::procCxt, res, _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_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(), ttdummy(), worker_spi_main(), and xpath_table().
char* SPI_fname | ( | TupleDesc | tupdesc, |
int | fnumber | ||
) |
Definition at line 1198 of file spi.c.
References 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().
int SPI_fnumber | ( | TupleDesc | tupdesc, |
const char * | fname | ||
) |
Definition at line 1175 of file spi.c.
References FormData_pg_attribute, namestrcmp(), TupleDescData::natts, res, 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(), tsvector_update_trigger(), and ttdummy().
int SPI_freeplan | ( | SPIPlanPtr | plan | ) |
Definition at line 1025 of file spi.c.
References _SPI_PLAN_MAGIC, DropCachedPlan(), 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().
void SPI_freetuple | ( | HeapTuple | tuple | ) |
void SPI_freetuptable | ( | SPITupleTable * | tuptable | ) |
Definition at line 1386 of file spi.c.
References _SPI_current, slist_mutable_iter::cur, elog, 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().
int SPI_getargcount | ( | SPIPlanPtr | plan | ) |
Definition at line 1890 of file spi.c.
References _SPI_PLAN_MAGIC, plan, SPI_ERROR_ARGUMENT, and SPI_result.
Oid SPI_getargtypeid | ( | SPIPlanPtr | plan, |
int | argIndex | ||
) |
Definition at line 1875 of file spi.c.
References _SPI_PLAN_MAGIC, 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(), ttdummy(), and worker_spi_main().
char* SPI_getnspname | ( | Relation | rel | ) |
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().
char* SPI_getrelname | ( | Relation | rel | ) |
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(), PLy_trigger_build_args(), and ttdummy().
char* SPI_gettype | ( | TupleDesc | tupdesc, |
int | fnumber | ||
) |
Definition at line 1268 of file spi.c.
References 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(), tsvector_update_trigger(), and ttdummy().
Definition at line 1220 of file spi.c.
References 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().
bool SPI_inside_nonatomic_context | ( | void | ) |
Definition at line 581 of file spi.c.
References _SPI_current, _SPI_connection::atomic, and IsSubTransaction().
Referenced by StartTransaction().
bool SPI_is_cursor_plan | ( | SPIPlanPtr | plan | ) |
Definition at line 1910 of file spi.c.
References _SPI_PLAN_MAGIC, linitial, list_length(), plan, CachedPlanSource::resultDesc, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by SPI_cursor_open_internal().
int SPI_keepplan | ( | SPIPlanPtr | plan | ) |
Definition at line 976 of file spi.c.
References _SPI_PLAN_MAGIC, CacheMemoryContext, 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(), ri_PlanCheck(), and ttdummy().
HeapTuple SPI_modifytuple | ( | Relation | rel, |
HeapTuple | tuple, | ||
int | natts, | ||
int * | attnum, | ||
Datum * | Values, | ||
const char * | Nulls | ||
) |
Definition at line 1106 of file spi.c.
References _SPI_current, attnum, heap_deform_tuple(), heap_form_tuple(), i, MemoryContextSwitchTo(), TupleDescData::natts, Nulls, palloc(), 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.
Referenced by ttdummy().
void* SPI_palloc | ( | Size | size | ) |
Definition at line 1338 of file spi.c.
References _SPI_current, elog, ERROR, MemoryContextAlloc(), _SPI_connection::savedcxt, and size.
Referenced by _SPI_strdup(), and coerce_function_result_tuple().
void SPI_pfree | ( | void * | pointer | ) |
CachedPlan* SPI_plan_get_cached_plan | ( | SPIPlanPtr | plan | ) |
Definition at line 2076 of file spi.c.
References _SPI_current, _SPI_error_callback(), _SPI_PLAN_MAGIC, ErrorContextCallback::arg, Assert, ErrorContextCallback::callback, CurrentResourceOwner, error_context_stack, GetCachedPlan(), CachedPlanSource::gplan, linitial, list_length(), SPICallbackArg::mode, plan, ErrorContextCallback::previous, SPICallbackArg::query, CachedPlanSource::query_string, and _SPI_connection::queryEnv.
Referenced by exec_eval_simple_expr(), exec_simple_check_plan(), make_callstmt_target(), and test_predtest().
List* SPI_plan_get_plan_sources | ( | SPIPlanPtr | plan | ) |
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().
bool SPI_plan_is_valid | ( | SPIPlanPtr | plan | ) |
Definition at line 1948 of file spi.c.
References _SPI_PLAN_MAGIC, Assert, CachedPlanIsValid(), lfirst, and plan.
Referenced by ri_FetchPreparedPlan().
SPIPlanPtr SPI_prepare | ( | const char * | src, |
int | nargs, | ||
Oid * | argtypes | ||
) |
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(), tsquery_rewrite_query(), and ttdummy().
SPIPlanPtr SPI_prepare_cursor | ( | const char * | src, |
int | nargs, | ||
Oid * | argtypes, | ||
int | cursorOptions | ||
) |
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(), plan, RAW_PARSE_DEFAULT, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by SPI_prepare().
SPIPlanPtr SPI_prepare_extended | ( | const char * | src, |
const SPIPrepareOptions * | options | ||
) |
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(), plan, SPI_ERROR_ARGUMENT, and SPI_result.
Referenced by exec_prepare_plan().
SPIPlanPtr SPI_prepare_params | ( | const char * | src, |
ParserSetupHook | parserSetup, | ||
void * | parserSetupArg, | ||
int | cursorOptions | ||
) |
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(), plan, RAW_PARSE_DEFAULT, SPI_ERROR_ARGUMENT, and SPI_result.
bool spi_printtup | ( | TupleTableSlot * | slot, |
DestReceiver * | self | ||
) |
Definition at line 2171 of file spi.c.
References _SPI_current, SPITupleTable::alloced, elog, ERROR, ExecCopySlotHeapTuple(), MemoryContextSwitchTo(), SPITupleTable::numvals, repalloc_huge(), SPITupleTable::tuptabcxt, _SPI_connection::tuptable, and SPITupleTable::vals.
int SPI_register_relation | ( | EphemeralNamedRelation | enr | ) |
Definition at line 3297 of file spi.c.
References _SPI_begin_call(), _SPI_current, _SPI_end_call(), _SPI_find_ENR_by_name(), create_queryEnv(), EphemeralNamedRelationData::md, EphemeralNamedRelationMetadataData::name, _SPI_connection::queryEnv, register_ENR(), res, SPI_ERROR_ARGUMENT, SPI_ERROR_REL_DUPLICATE, and SPI_OK_REL_REGISTER.
Referenced by SPI_register_trigger_data().
int SPI_register_trigger_data | ( | TriggerData * | tdata | ) |
Definition at line 3364 of file spi.c.
References ENR_NAMED_TUPLESTORE, EphemeralNamedRelationMetadataData::enrtuples, EphemeralNamedRelationMetadataData::enrtype, EphemeralNamedRelationData::md, EphemeralNamedRelationMetadataData::name, palloc(), RelationData::rd_id, EphemeralNamedRelationData::reldata, EphemeralNamedRelationMetadataData::reliddesc, SPI_ERROR_ARGUMENT, SPI_OK_REL_REGISTER, SPI_OK_TD_REGISTER, SPI_register_relation(), TriggerData::tg_newtable, TriggerData::tg_oldtable, TriggerData::tg_relation, TriggerData::tg_trigger, Trigger::tgnewtable, Trigger::tgoldtable, EphemeralNamedRelationMetadataData::tupdesc, and tuplestore_tuple_count().
Referenced by plperl_trigger_handler(), plpgsql_exec_trigger(), plsample_trigger_handler(), pltcl_trigger_handler(), and PLy_exec_trigger().
void* SPI_repalloc | ( | void * | pointer, |
Size | size | ||
) |
const char* SPI_result_code_string | ( | int | code | ) |
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(), ri_PlanCheck(), and ttdummy().
HeapTupleHeader SPI_returntuple | ( | HeapTuple | tuple, |
TupleDesc | tupdesc | ||
) |
Definition at line 1074 of file spi.c.
References _SPI_current, assign_record_type_typmod(), DatumGetHeapTupleHeader, 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().
void SPI_rollback | ( | void | ) |
Definition at line 413 of file spi.c.
References _SPI_rollback().
Referenced by exec_stmt_rollback(), plperl_spi_rollback(), pltcl_rollback(), and PLy_rollback().
void SPI_rollback_and_chain | ( | void | ) |
Definition at line 419 of file spi.c.
References _SPI_rollback().
Referenced by exec_stmt_rollback().
SPIPlanPtr SPI_saveplan | ( | SPIPlanPtr | plan | ) |
Definition at line 1003 of file spi.c.
References _SPI_begin_call(), _SPI_end_call(), _SPI_PLAN_MAGIC, _SPI_save_plan(), plan, SPI_ERROR_ARGUMENT, and SPI_result.
void SPI_scroll_cursor_fetch | ( | Portal | portal, |
FetchDirection | direction, | ||
long | count | ||
) |
Definition at line 1835 of file spi.c.
References _SPI_cursor_operation(), CreateDestReceiver(), and DestSPI.
Referenced by exec_stmt_fetch().
void SPI_scroll_cursor_move | ( | Portal | portal, |
FetchDirection | direction, | ||
long | count | ||
) |
Definition at line 1850 of file spi.c.
References _SPI_cursor_operation(), and None_Receiver.
Referenced by exec_stmt_fetch().
int SPI_unregister_relation | ( | const char * | name | ) |
Definition at line 3331 of file spi.c.
References _SPI_begin_call(), _SPI_current, _SPI_end_call(), _SPI_find_ENR_by_name(), EphemeralNamedRelationData::md, name, EphemeralNamedRelationMetadataData::name, _SPI_connection::queryEnv, res, SPI_ERROR_ARGUMENT, SPI_ERROR_REL_NOT_FOUND, SPI_OK_REL_UNREGISTER, and unregister_ENR().
|
static |
Definition at line 51 of file spi.c.
Referenced by AtEOSubXact_SPI(), AtEOXact_SPI(), SPI_connect_ext(), and SPI_finish().
|
static |
Definition at line 49 of file spi.c.
Referenced by _SPI_begin_call(), _SPI_checktuples(), _SPI_commit(), _SPI_cursor_operation(), _SPI_end_call(), _SPI_execmem(), _SPI_execute_plan(), _SPI_find_ENR_by_name(), _SPI_make_plan_non_temp(), _SPI_pquery(), _SPI_prepare_plan(), _SPI_procmem(), _SPI_rollback(), AtEOSubXact_SPI(), AtEOXact_SPI(), SPI_connect_ext(), SPI_copytuple(), SPI_cursor_open_internal(), SPI_datumTransfer(), spi_dest_startup(), SPI_finish(), SPI_freetuptable(), SPI_inside_nonatomic_context(), SPI_modifytuple(), SPI_palloc(), SPI_plan_get_cached_plan(), spi_printtup(), SPI_register_relation(), SPI_returntuple(), and SPI_unregister_relation().
|
static |
Definition at line 48 of file spi.c.
Referenced by AtEOSubXact_SPI(), AtEOXact_SPI(), SPI_connect_ext(), and SPI_finish().
|
static |
Definition at line 50 of file spi.c.
Referenced by SPI_connect_ext().
uint64 SPI_processed = 0 |
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().
int SPI_result = 0 |
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(), SPI_saveplan(), and ttdummy().
SPITupleTable* SPI_tuptable = NULL |
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().