|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Typedefs | |
| typedef struct PlannedStmt | PlannedStmt |
Functions | |
| PortalStrategy | ChoosePortalStrategy (List *stmts) |
| List * | FetchPortalTargetList (Portal portal) |
| List * | FetchStatementTargetList (Node *stmt) |
| void | PortalStart (Portal portal, ParamListInfo params, int eflags, Snapshot snapshot) |
| void | PortalSetResultFormat (Portal portal, int nFormats, int16 *formats) |
| bool | PortalRun (Portal portal, long count, bool isTopLevel, DestReceiver *dest, DestReceiver *altdest, QueryCompletion *qc) |
| uint64 | PortalRunFetch (Portal portal, FetchDirection fdirection, long count, DestReceiver *dest) |
| bool | PlannedStmtRequiresSnapshot (PlannedStmt *pstmt) |
| void | EnsurePortalSnapshotExists (void) |
Variables | |
| PGDLLIMPORT Portal | ActivePortal |
|
extern |
Definition at line 205 of file pquery.c.
References PlannedStmt::canSetTag, CMD_SELECT, CMD_UTILITY, Query::commandType, PlannedStmt::commandType, elog, ERROR, fb(), PlannedStmt::hasModifyingCTE, PlannedStmt::hasReturning, IsA, lfirst, linitial, list_length(), NIL, nodeTag, PORTAL_MULTI_QUERY, PORTAL_ONE_MOD_WITH, PORTAL_ONE_RETURNING, PORTAL_ONE_SELECT, PORTAL_UTIL_SELECT, Query::returningList, stmt, UtilityReturnsTuples(), Query::utilityStmt, and PlannedStmt::utilityStmt.
Referenced by PlanCacheComputeResultDesc(), and PortalStart().
Definition at line 1760 of file pquery.c.
References ActivePortal, ActiveSnapshotSet(), Assert, PortalData::createLevel, elog, ERROR, fb(), GetActiveSnapshot(), GetTransactionSnapshot(), PortalData::portalSnapshot, PushActiveSnapshotWithLevel(), and unlikely.
Referenced by _SPI_execute_plan(), exec_eval_simple_expr(), and ExecuteCallStmt().
Definition at line 322 of file pquery.c.
References FetchStatementTargetList(), NIL, PORTAL_MULTI_QUERY, PortalGetPrimaryStmt(), and PortalData::strategy.
Referenced by exec_describe_portal_message(), FetchStatementTargetList(), and printtup_startup().
Definition at line 344 of file pquery.c.
References Assert, CMD_SELECT, CMD_UTILITY, Query::commandType, PlannedStmt::commandType, fb(), FetchPortalTargetList(), FetchPreparedStatement(), FetchPreparedStatementTargetList(), GetPortalByName(), PlannedStmt::hasReturning, IsA, NIL, PlannedStmt::planTree, PortalIsValid, Query::returningList, stmt, Query::targetList, Plan::targetlist, Query::utilityStmt, and PlannedStmt::utilityStmt.
Referenced by CachedPlanGetTargetList(), and FetchPortalTargetList().
|
extern |
Definition at line 1711 of file pquery.c.
References fb(), IsA, and PlannedStmt::utilityStmt.
Referenced by _SPI_execute_plan(), and PortalRunUtility().
|
extern |
Definition at line 680 of file pquery.c.
References ActivePortal, Assert, PortalData::atEnd, QueryCompletion::commandTag, CopyQueryCompletion(), CurrentMemoryContext, CurrentResourceOwner, DEBUG3, elog, ERROR, fb(), FillPortalStore(), PortalData::holdStore, InitializeQueryCompletion(), log_executor_stats, MarkPortalActive(), MarkPortalDone(), MarkPortalFailed(), MemoryContextSwitchTo(), QueryCompletion::nprocessed, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PORTAL_MULTI_QUERY, PORTAL_ONE_MOD_WITH, PORTAL_ONE_RETURNING, PORTAL_ONE_SELECT, PORTAL_READY, PORTAL_UTIL_SELECT, PortalContext, PortalData::portalContext, PortalIsValid, PortalRunMulti(), PortalRunSelect(), PortalData::qc, ResetUsage(), PortalData::resowner, ShowUsage(), PortalData::status, PortalData::strategy, TopTransactionContext, and TopTransactionResourceOwner.
Referenced by exec_execute_message(), exec_simple_query(), and ExecuteQuery().
|
extern |
Definition at line 1373 of file pquery.c.
References ActivePortal, Assert, CurrentResourceOwner, DoPortalRunFetch(), elog, ERROR, fb(), FillPortalStore(), PortalData::holdStore, MarkPortalActive(), MarkPortalFailed(), MemoryContextSwitchTo(), PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PORTAL_ONE_MOD_WITH, PORTAL_ONE_RETURNING, PORTAL_ONE_SELECT, PORTAL_READY, PORTAL_UTIL_SELECT, PortalContext, PortalData::portalContext, PortalIsValid, PortalData::resowner, PortalData::status, and PortalData::strategy.
Referenced by _SPI_cursor_operation(), and PerformPortalFetch().
Definition at line 619 of file pquery.c.
References ereport, errcode(), errmsg(), ERROR, fb(), PortalData::formats, i, MemoryContextAlloc(), TupleDescData::natts, PortalData::portalContext, and PortalData::tupDesc.
Referenced by exec_bind_message(), and exec_simple_query().
|
extern |
Definition at line 429 of file pquery.c.
References ActivePortal, Assert, PortalData::atEnd, PortalData::atStart, ChoosePortalStrategy(), CMD_UTILITY, PlannedStmt::commandType, CreateQueryDesc(), CurrentResourceOwner, CURSOR_OPT_SCROLL, PortalData::cursorOptions, EXEC_FLAG_BACKWARD, EXEC_FLAG_REWIND, ExecCleanTypeFromTL(), ExecutorStart(), fb(), GetActiveSnapshot(), GetTransactionSnapshot(), InvalidSnapshot, linitial_node, MarkPortalFailed(), MemoryContextSwitchTo(), None_Receiver, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PlannedStmt::planTree, PopActiveSnapshot(), PORTAL_DEFINED, PORTAL_MULTI_QUERY, PORTAL_ONE_MOD_WITH, PORTAL_ONE_RETURNING, PORTAL_ONE_SELECT, PORTAL_READY, PORTAL_UTIL_SELECT, PortalContext, PortalData::portalContext, PortalGetPrimaryStmt(), PortalIsValid, PortalData::portalParams, PortalData::portalPos, PushActiveSnapshot(), PortalData::queryDesc, PortalData::queryEnv, PortalData::resowner, PortalData::sourceText, PortalData::status, PortalData::stmts, PortalData::strategy, Plan::targetlist, QueryDesc::tupDesc, PortalData::tupDesc, PlannedStmt::utilityStmt, and UtilityTupleDescriptor().
Referenced by exec_bind_message(), exec_simple_query(), ExecuteQuery(), PerformCursorOpen(), and SPI_cursor_open_internal().
|
extern |
Definition at line 36 of file pquery.c.
Referenced by EnsurePortalSnapshotExists(), function_parse_error_transpose(), PersistHoldablePortal(), PortalRun(), PortalRunFetch(), and PortalStart().