PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
void | PerformCursorOpen (ParseState *pstate, DeclareCursorStmt *cstmt, ParamListInfo params, bool isTopLevel) |
void | PerformPortalFetch (FetchStmt *stmt, DestReceiver *dest, QueryCompletion *qc) |
void | PerformPortalClose (const char *name) |
void | PortalCleanup (Portal portal) |
void | PersistHoldablePortal (Portal portal) |
void PerformCursorOpen | ( | ParseState * | pstate, |
DeclareCursorStmt * | cstmt, | ||
ParamListInfo | params, | ||
bool | isTopLevel | ||
) |
Definition at line 43 of file portalcmds.c.
References Assert, castNode, CMD_SELECT, Query::commandType, copyObject, copyParamList(), CreatePortal(), CURSOR_OPT_HOLD, CURSOR_OPT_NO_SCROLL, CURSOR_OPT_SCROLL, PortalData::cursorOptions, elog, ereport, errcode(), errmsg(), ERROR, ExecSupportsBackwardScan(), GetActiveSnapshot(), InSecurityRestrictedOperation(), linitial_node, list_length(), list_make1, MemoryContextSwitchTo(), NIL, DeclareCursorStmt::options, ParseState::p_sourcetext, pg_plan_query(), plan, PORTAL_ONE_SELECT, PortalData::portalContext, PortalDefineQuery(), DeclareCursorStmt::portalname, PortalStart(), pstrdup(), DeclareCursorStmt::query, QueryRewrite(), RequireTransactionBlock(), and PortalData::strategy.
Referenced by standard_ProcessUtility().
void PerformPortalClose | ( | const char * | name | ) |
Definition at line 214 of file portalcmds.c.
References ereport, errcode(), errmsg(), ERROR, GetPortalByName(), name, PortalDrop(), PortalHashTableDeleteAll(), and PortalIsValid.
Referenced by standard_ProcessUtility().
void PerformPortalFetch | ( | FetchStmt * | stmt, |
DestReceiver * | dest, | ||
QueryCompletion * | qc | ||
) |
Definition at line 167 of file portalcmds.c.
References generate_unaccent_rules::dest, ereport, errcode(), errmsg(), ERROR, GetPortalByName(), None_Receiver, PortalIsValid, PortalRunFetch(), SetQueryCompletion(), and stmt.
Referenced by standard_ProcessUtility().
void PersistHoldablePortal | ( | Portal | portal | ) |
Definition at line 316 of file portalcmds.c.
References ActivePortal, Assert, PortalData::atEnd, CreateDestReceiver(), PortalData::createSubid, CreateTupleDescCopy(), CurrentResourceOwner, CURSOR_OPT_SCROLL, PortalData::cursorOptions, QueryDesc::dest, DestTuplestore, elog, ERROR, ExecutorEnd(), ExecutorFinish(), ExecutorRewind(), ExecutorRun(), ForwardScanDirection, FreeQueryDesc(), PortalData::holdContext, PortalData::holdSnapshot, PortalData::holdStore, InvalidSubTransactionId, MarkPortalActive(), MarkPortalFailed(), MemoryContextDeleteChildren(), MemoryContextSwitchTo(), NoMovementScanDirection, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PopActiveSnapshot(), PORTAL_READY, PortalContext, PortalData::portalContext, PortalData::portalPos, PushActiveSnapshot(), PortalData::queryDesc, _DestReceiver::rDestroy, PortalData::resowner, SetTuplestoreDestReceiverParams(), QueryDesc::snapshot, PortalData::status, PortalData::tupDesc, tuplestore_rescan(), and tuplestore_skiptuples().
Referenced by HoldPortal().
void PortalCleanup | ( | Portal | portal | ) |
Definition at line 263 of file portalcmds.c.
References Assert, PortalData::cleanup, CurrentResourceOwner, ExecutorEnd(), ExecutorFinish(), FreeQueryDesc(), PORTAL_FAILED, PortalIsValid, PortalData::queryDesc, PortalData::resowner, and PortalData::status.
Referenced by CreatePortal().