|
PostgreSQL Source Code git master
|
#include "datatype/timestamp.h"#include "executor/execdesc.h"#include "tcop/cmdtag.h"#include "utils/plancache.h"#include "utils/resowner.h"

Go to the source code of this file.
Data Structures | |
| struct | PortalData |
Macros | |
| #define | PortalIsValid(p) ((p) != NULL) |
Typedefs | |
| typedef enum PortalStrategy | PortalStrategy |
| typedef enum PortalStatus | PortalStatus |
| typedef struct PortalData * | Portal |
| typedef struct PortalData | PortalData |
Enumerations | |
| enum | PortalStrategy { PORTAL_ONE_SELECT , PORTAL_ONE_RETURNING , PORTAL_ONE_MOD_WITH , PORTAL_UTIL_SELECT , PORTAL_MULTI_QUERY } |
| enum | PortalStatus { PORTAL_NEW , PORTAL_DEFINED , PORTAL_READY , PORTAL_ACTIVE , PORTAL_DONE , PORTAL_FAILED } |
| Enumerator | |
|---|---|
| PORTAL_NEW | |
| PORTAL_DEFINED | |
| PORTAL_READY | |
| PORTAL_ACTIVE | |
| PORTAL_DONE | |
| PORTAL_FAILED | |
Definition at line 103 of file portal.h.
| Enumerator | |
|---|---|
| PORTAL_ONE_SELECT | |
| PORTAL_ONE_RETURNING | |
| PORTAL_ONE_MOD_WITH | |
| PORTAL_UTIL_SELECT | |
| PORTAL_MULTI_QUERY | |
Definition at line 89 of file portal.h.
Definition at line 780 of file portalmem.c.
References PortalData::autoHeld, PortalData::cleanup, PortalData::createSubid, fb(), hash_seq_init(), hash_seq_search(), InvalidSubTransactionId, MarkPortalFailed(), MemoryContextDeleteChildren(), PORTAL_ACTIVE, PORTAL_READY, PortalData::portalContext, PortalHashTable, PortalReleaseCachedPlan(), PortalData::resowner, shmem_exit_inprogress, and PortalData::status.
Referenced by AbortOutOfAnyTransaction(), and AbortTransaction().
Definition at line 858 of file portalmem.c.
References Assert, PortalData::autoHeld, PortalData::cleanup, PortalData::createSubid, elog, fb(), hash_seq_init(), hash_seq_search(), InvalidSubTransactionId, PortalData::name, PORTAL_ACTIVE, PortalDrop(), PortalHashTable, PortalData::portalPinned, PortalData::resowner, PortalData::status, and WARNING.
Referenced by CleanupTransaction().
|
extern |
Definition at line 979 of file portalmem.c.
References PortalData::activeSubid, PortalData::cleanup, PortalData::createSubid, fb(), hash_seq_init(), hash_seq_search(), MarkPortalFailed(), MemoryContextDeleteChildren(), PORTAL_ACTIVE, PORTAL_FAILED, PORTAL_READY, PortalData::portalContext, PortalHashTable, PortalReleaseCachedPlan(), ResourceOwnerNewParent(), PortalData::resowner, and PortalData::status.
Referenced by AbortOutOfAnyTransaction(), and AbortSubTransaction().
|
extern |
Definition at line 1092 of file portalmem.c.
References PortalData::cleanup, PortalData::createSubid, elog, fb(), hash_seq_init(), hash_seq_search(), PortalData::name, PortalDrop(), PortalHashTable, PortalData::portalPinned, and WARNING.
Referenced by CleanupSubTransaction().
|
extern |
Definition at line 943 of file portalmem.c.
References PortalData::activeSubid, PortalData::createLevel, PortalData::createSubid, fb(), hash_seq_init(), hash_seq_search(), PortalHashTable, ResourceOwnerNewParent(), and PortalData::resowner.
Referenced by CommitSubTransaction().
Definition at line 235 of file portalmem.c.
References CreatePortal(), fb(), GetPortalByName(), MAX_PORTALNAME_LEN, and sprintf.
Referenced by ExecuteQuery(), and SPI_cursor_open_internal().
Definition at line 175 of file portalmem.c.
References PortalData::activeSubid, ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, PortalData::atEnd, PortalData::atStart, PortalData::cleanup, PortalData::createLevel, PortalData::createSubid, PortalData::creation_time, CURSOR_OPT_NO_SCROLL, PortalData::cursorOptions, CurTransactionResourceOwner, ereport, errcode(), errmsg(), ERROR, fb(), GetCurrentStatementStartTimestamp(), GetCurrentSubTransactionId(), GetCurrentTransactionNestLevel(), GetPortalByName(), MemoryContextAllocZero(), MemoryContextSetIdentifier(), name, PortalData::name, PORTAL_MULTI_QUERY, PORTAL_NEW, PortalCleanup(), PortalData::portalContext, PortalDrop(), PortalHashTableInsert, PortalIsValid, ResourceOwnerCreate(), PortalData::resowner, PortalData::status, PortalData::strategy, TopPortalContext, PortalData::visible, and WARNING.
Referenced by CreateNewPortal(), exec_bind_message(), exec_simple_query(), PerformCursorOpen(), and SPI_cursor_open_internal().
Definition at line 104 of file portalmem.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, ctl, fb(), hash_create(), HASH_ELEM, HASH_STRINGS, MAX_PORTALNAME_LEN, PortalHashTable, PORTALS_PER_USER, TopMemoryContext, and TopPortalContext.
Referenced by InitPostgres().
Definition at line 1256 of file portalmem.c.
References ActiveSnapshotSet(), elog, ERROR, fb(), hash_seq_init(), hash_seq_search(), PopActiveSnapshot(), PortalHashTable, and PortalData::portalSnapshot.
Referenced by _SPI_commit(), and _SPI_rollback().
Definition at line 130 of file portalmem.c.
References fb(), name, and PortalHashTableLookup.
Referenced by CreateNewPortal(), CreatePortal(), exec_describe_portal_message(), exec_execute_message(), exec_simple_query(), execCurrentOf(), FetchStatementTargetList(), PerformPortalClose(), PerformPortalFetch(), PLy_cursor_close(), PLy_cursor_dealloc(), PLy_cursor_fetch(), PLy_cursor_iternext(), PostgresMain(), SPI_cursor_find(), UtilityReturnsTuples(), and UtilityTupleDescriptor().
Definition at line 1207 of file portalmem.c.
References PortalData::autoHeld, elog, ereport, errcode(), errmsg(), ERROR, fb(), hash_seq_init(), hash_seq_search(), HoldPortal(), PORTAL_ONE_SELECT, PORTAL_READY, PortalHashTable, PortalData::portalPinned, PortalData::status, and PortalData::strategy.
Referenced by _SPI_commit(), and _SPI_rollback().
Definition at line 394 of file portalmem.c.
References PortalData::activeSubid, ereport, errcode(), errmsg(), ERROR, fb(), GetCurrentSubTransactionId(), PortalData::name, PORTAL_ACTIVE, PORTAL_READY, and PortalData::status.
Referenced by PersistHoldablePortal(), PortalRun(), and PortalRunFetch().
Definition at line 413 of file portalmem.c.
References Assert, PortalData::cleanup, fb(), PORTAL_ACTIVE, PORTAL_DONE, and PortalData::status.
Referenced by PortalRun().
Definition at line 441 of file portalmem.c.
References Assert, PortalData::cleanup, fb(), PORTAL_DONE, PORTAL_FAILED, and PortalData::status.
Referenced by AtAbort_Portals(), AtSubAbort_Portals(), PersistHoldablePortal(), PortalRun(), PortalRunFetch(), and PortalStart().
Definition at line 370 of file portalmem.c.
References elog, ERROR, and PortalData::portalPinned.
Referenced by exec_for_query(), plperl_spi_query(), plperl_spi_query_prepared(), PLy_cursor_plan(), and PLy_cursor_query().
Definition at line 330 of file portalmem.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, CURSOR_OPT_SCROLL, PortalData::cursorOptions, fb(), PortalData::holdContext, PortalData::holdSnapshot, PortalData::holdStore, MemoryContextSwitchTo(), TopPortalContext, tuplestore_begin_heap(), and work_mem.
Referenced by FillPortalStore(), and HoldPortal().
|
extern |
Definition at line 282 of file portalmem.c.
References Assert, PortalData::commandTag, PortalData::cplan, fb(), NIL, PORTAL_DEFINED, PORTAL_NEW, PortalIsValid, PortalData::prepStmtName, PortalData::qc, SetQueryCompletion(), PortalData::sourceText, PortalData::status, and PortalData::stmts.
Referenced by exec_bind_message(), exec_simple_query(), ExecuteQuery(), PerformCursorOpen(), and SPI_cursor_open_internal().
Definition at line 467 of file portalmem.c.
References Assert, PortalData::cleanup, ereport, errcode(), errmsg(), ERROR, fb(), PortalData::holdContext, PortalData::holdSnapshot, PortalData::holdStore, MemoryContextDelete(), MemoryContextSwitchTo(), PortalData::name, pfree(), PORTAL_ACTIVE, PORTAL_FAILED, PortalData::portalContext, PortalHashTableDelete, PortalIsValid, PortalData::portalPinned, PortalReleaseCachedPlan(), PortalData::portalSnapshot, RESOURCE_RELEASE_AFTER_LOCKS, RESOURCE_RELEASE_BEFORE_LOCKS, RESOURCE_RELEASE_LOCKS, ResourceOwnerDelete(), ResourceOwnerRelease(), PortalData::resowner, PortalData::status, tuplestore_end(), and UnregisterSnapshotFromOwner().
Referenced by AtCleanup_Portals(), AtSubCleanup_Portals(), CreatePortal(), exec_simple_query(), ExecuteQuery(), PerformPortalClose(), PortalErrorCleanup(), PortalHashTableDeleteAll(), PostgresMain(), PreCommit_Portals(), and SPI_cursor_close().
Definition at line 917 of file portalmem.c.
References PortalData::autoHeld, fb(), hash_seq_init(), hash_seq_search(), PortalDrop(), PortalHashTable, and PortalData::portalPinned.
Referenced by PostgresMain().
|
extern |
Definition at line 151 of file portalmem.c.
References fb(), lfirst_node, stmt, and PortalData::stmts.
Referenced by FetchPortalTargetList(), and PortalStart().
Definition at line 606 of file portalmem.c.
References fb(), hash_seq_init(), hash_seq_search(), hash_seq_term(), PORTAL_ACTIVE, PortalDrop(), PortalHashTable, and PortalData::status.
Referenced by DiscardAll(), and PerformPortalClose().
Definition at line 676 of file portalmem.c.
References PortalData::autoHeld, PortalData::createSubid, CURSOR_OPT_HOLD, PortalData::cursorOptions, elog, ereport, errcode(), errmsg(), ERROR, fb(), hash_seq_init(), hash_seq_search(), hash_seq_term(), HoldPortal(), PortalData::holdSnapshot, InvalidSubTransactionId, PORTAL_ACTIVE, PORTAL_READY, PortalDrop(), PortalHashTable, PortalData::portalPinned, PortalData::portalSnapshot, PortalData::resowner, PortalData::status, and UnregisterSnapshotFromOwner().
Referenced by CommitTransaction(), and PrepareTransaction().
Definition at line 1171 of file portalmem.c.
References fb(), hash_seq_init(), hash_seq_search(), PORTAL_READY, PortalHashTable, and PortalData::status.
Referenced by CopyFrom().
Definition at line 379 of file portalmem.c.
References elog, ERROR, and PortalData::portalPinned.
Referenced by exec_for_query(), plperl_spi_cursor_close(), plperl_spi_fetchrow(), PLy_cursor_close(), and PLy_cursor_dealloc().