|
PostgreSQL Source Code git master
|
#include "commands/explain_state.h"#include "datatype/timestamp.h"#include "tcop/dest.h"#include "utils/plancache.h"

Go to the source code of this file.
Data Structures | |
| struct | PreparedStatement |
Functions | |
| void | PrepareQuery (ParseState *pstate, PrepareStmt *stmt, int stmt_location, int stmt_len) |
| void | ExecuteQuery (ParseState *pstate, ExecuteStmt *stmt, IntoClause *intoClause, ParamListInfo params, DestReceiver *dest, QueryCompletion *qc) |
| void | DeallocateQuery (DeallocateStmt *stmt) |
| void | ExplainExecuteQuery (ExecuteStmt *execstmt, IntoClause *into, ExplainState *es, ParseState *pstate, ParamListInfo params) |
| void | StorePreparedStatement (const char *stmt_name, CachedPlanSource *plansource, bool from_sql) |
| PreparedStatement * | FetchPreparedStatement (const char *stmt_name, bool throwError) |
| void | DropPreparedStatement (const char *stmt_name, bool showError) |
| TupleDesc | FetchPreparedStatementResultDesc (PreparedStatement *stmt) |
| List * | FetchPreparedStatementTargetList (PreparedStatement *stmt) |
| void | DropAllPreparedStatements (void) |
|
extern |
Definition at line 505 of file prepare.c.
References DropAllPreparedStatements(), DropPreparedStatement(), and stmt.
Referenced by standard_ProcessUtility().
Definition at line 540 of file prepare.c.
References DropCachedPlan(), fb(), HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), PreparedStatement::plansource, prepared_queries, and PreparedStatement::stmt_name.
Referenced by DeallocateQuery(), and DiscardAll().
Definition at line 519 of file prepare.c.
References DropCachedPlan(), fb(), FetchPreparedStatement(), HASH_REMOVE, hash_search(), PreparedStatement::plansource, prepared_queries, and PreparedStatement::stmt_name.
Referenced by DeallocateQuery(), and PostgresMain().
|
extern |
Definition at line 150 of file prepare.c.
References CMD_SELECT, CachedPlanSource::commandTag, PlannedStmt::commandType, CreateExecutorState(), CreateNewPortal(), elog, ereport, errcode(), errmsg(), ERROR, EState::es_param_list_info, EvaluateParams(), fb(), FETCH_ALL, FetchPreparedStatement(), CachedPlanSource::fixed_result, FreeExecutorState(), GetActiveSnapshot(), GetCachedPlan(), GetIntoRelEFlags(), linitial_node, list_length(), MemoryContextStrdup(), CachedPlanSource::num_params, PreparedStatement::plansource, PortalData::portalContext, PortalDefineQuery(), PortalDrop(), PortalRun(), PortalStart(), CachedPlanSource::query_string, IntoClause::skipData, stmt, CachedPlan::stmt_list, and PortalData::visible.
Referenced by ExecCreateTableAs(), and standard_ProcessUtility().
|
extern |
Definition at line 571 of file prepare.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, ExplainState::buffers, BufferUsageAccumDiff(), CMD_UTILITY, PlannedStmt::commandType, CreateExecutorState(), CurrentMemoryContext, CurrentResourceOwner, elog, ERROR, EState::es_param_list_info, EvaluateParams(), ExplainOnePlan(), ExplainOneUtility(), ExplainSeparatePlans(), fb(), FetchPreparedStatement(), CachedPlanSource::fixed_result, FreeExecutorState(), GetCachedPlan(), INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, IsA, lfirst_node, lnext(), make_parsestate(), ExplainState::memory, MemoryContextMemConsumed(), MemoryContextSwitchTo(), CachedPlanSource::num_params, ParseState::p_queryEnv, ParseState::p_sourcetext, pgBufferUsage, PreparedStatement::plansource, CachedPlanSource::query_string, ReleaseCachedPlan(), CachedPlan::stmt_list, and PlannedStmt::utilityStmt.
Referenced by ExplainOneUtility().
|
extern |
Definition at line 434 of file prepare.c.
References ereport, errcode(), errmsg(), ERROR, fb(), HASH_FIND, hash_search(), and prepared_queries.
Referenced by DropPreparedStatement(), errdetail_execute(), exec_bind_message(), exec_describe_statement_message(), ExecuteQuery(), ExplainExecuteQuery(), FetchStatementTargetList(), GetCommandLogLevel(), UtilityReturnsTuples(), and UtilityTupleDescriptor().
|
extern |
Definition at line 466 of file prepare.c.
References Assert, CreateTupleDescCopy(), fb(), and stmt.
Referenced by UtilityTupleDescriptor().
|
extern |
Definition at line 489 of file prepare.c.
References CachedPlanGetTargetList(), copyObject, fb(), and stmt.
Referenced by FetchStatementTargetList().
|
extern |
Definition at line 59 of file prepare.c.
References CompleteCachedPlan(), CreateCachedPlan(), CreateCommandTag(), CURSOR_OPT_PARALLEL_OK, ereport, errcode(), errmsg(), ERROR, fb(), i, lfirst, list_length(), makeNode, ParseState::p_sourcetext, palloc_array, pg_analyze_and_rewrite_varparams(), stmt, StorePreparedStatement(), and typenameTypeId().
Referenced by standard_ProcessUtility().
|
extern |
Definition at line 392 of file prepare.c.
References ereport, errcode(), errmsg(), ERROR, fb(), PreparedStatement::from_sql, GetCurrentStatementStartTimestamp(), HASH_ENTER, hash_search(), InitQueryHashTable(), PreparedStatement::plansource, PreparedStatement::prepare_time, prepared_queries, and SaveCachedPlan().
Referenced by exec_parse_message(), and PrepareQuery().