* since other mechanisms will take care of releasing executor resources,
* and we can't be sure that ExecutorEnd itself wouldn't fail.
*/
- queryDesc = PortalGetQueryDesc(portal);
+ queryDesc = portal->queryDesc;
if (queryDesc)
{
/*
void
PersistHoldablePortal(Portal portal)
{
- QueryDesc *queryDesc = PortalGetQueryDesc(portal);
+ QueryDesc *queryDesc = portal->queryDesc;
Portal saveActivePortal;
ResourceOwner saveResourceOwner;
MemoryContext savePortalContext;
(errcode(ERRCODE_INVALID_CURSOR_STATE),
errmsg("cursor \"%s\" is not a SELECT query",
cursor_name)));
- queryDesc = PortalGetQueryDesc(portal);
+ queryDesc = portal->queryDesc;
if (queryDesc == NULL || queryDesc->estate == NULL)
ereport(ERROR,
(errcode(ERRCODE_INVALID_CURSOR_STATE),
* NB: queryDesc will be NULL if we are fetching from a held cursor or a
* completed utility query; can't use it in that path.
*/
- queryDesc = PortalGetQueryDesc(portal);
+ queryDesc = portal->queryDesc;
/* Caller messed up if we have neither a ready query nor held data. */
Assert(queryDesc || portal->holdStore);
}
/* Rewind executor, if active */
- queryDesc = PortalGetQueryDesc(portal);
+ queryDesc = portal->queryDesc;
if (queryDesc)
{
PushActiveSnapshot(queryDesc->snapshot);
*/
#define PortalIsValid(p) PointerIsValid(p)
-/*
- * Access macros for Portal ... use these in preference to field access.
- */
-#define PortalGetQueryDesc(portal) ((portal)->queryDesc)
-
/* Prototypes for functions in utils/mmgr/portalmem.c */
extern void EnablePortalManager(void);