* doesn't actually run the executor for them.
*
*
- * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.59 2003/07/25 20:17:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.61 2003/08/04 02:40:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* A simple subroutine to establish a portal's query.
*
* Notes: commandTag shall be NULL if and only if the original query string
- * (before rewriting) was an empty string. Also, the passed commandTag must
+ * (before rewriting) was an empty string. Also, the passed commandTag must
* be a pointer to a constant string, since it is not copied. The caller is
* responsible for ensuring that the passed sourceText (if any), parse and
* plan trees have adequate lifetime. Also, queryContext must accurately
MemoryContext queryContext)
{
AssertArg(PortalIsValid(portal));
- AssertState(portal->queryContext == NULL); /* else defined already */
+ AssertState(portal->queryContext == NULL); /* else defined already */
Assert(length(parseTrees) == length(planTrees));
Assert(portal->holdStore == NULL);
/*
- * Create the memory context that is used for storage of the tuple set.
- * Note this is NOT a child of the portal's heap memory.
+ * Create the memory context that is used for storage of the tuple
+ * set. Note this is NOT a child of the portal's heap memory.
*/
portal->holdContext =
AllocSetContextCreate(PortalMemory,
/*
* Remove portal from hash table. Because we do this first, we will
- * not come back to try to remove the portal again if there's any error
- * in the subsequent steps. Better to leak a little memory than to get
- * into an infinite error-recovery loop.
+ * not come back to try to remove the portal again if there's any
+ * error in the subsequent steps. Better to leak a little memory than
+ * to get into an infinite error-recovery loop.
*/
PortalHashTableDelete(portal);
while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL)
{
- Portal portal = hentry->portal;
+ Portal portal = hentry->portal;
if (portal->queryContext == queryContext)
PortalDrop(portal, false);
while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL)
{
- Portal portal = hentry->portal;
+ Portal portal = hentry->portal;
/*
- * Do not touch active portals --- this can only happen in the case of
- * a multi-transaction utility command, such as VACUUM.
+ * Do not touch active portals --- this can only happen in the
+ * case of a multi-transaction utility command, such as VACUUM.
*/
if (portal->portalActive)
continue;
if (portal->cursorOptions & CURSOR_OPT_HOLD)
{
/*
- * Do nothing to cursors held over from a previous transaction.
+ * Do nothing to cursors held over from a previous
+ * transaction.
*/
if (portal->createXact != xact)
continue;
/*
* We are exiting the transaction that created a holdable
- * cursor. Instead of dropping the portal, prepare it for
+ * cursor. Instead of dropping the portal, prepare it for
* access by later transactions.
*
- * Note that PersistHoldablePortal() must release all
- * resources used by the portal that are local to the creating
+ * Note that PersistHoldablePortal() must release all resources
+ * used by the portal that are local to the creating
* transaction.
*/
PortalCreateHoldStore(portal);
while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL)
{
- Portal portal = hentry->portal;
+ Portal portal = hentry->portal;
portal->portalActive = false;
/*
- * Do nothing else to cursors held over from a previous transaction.
- * (This test must include checking CURSOR_OPT_HOLD, else we will
- * fail to clean up a VACUUM portal if it fails after its first
- * sub-transaction.)
+ * Do nothing else to cursors held over from a previous
+ * transaction. (This test must include checking CURSOR_OPT_HOLD,
+ * else we will fail to clean up a VACUUM portal if it fails after
+ * its first sub-transaction.)
*/
if (portal->createXact != xact &&
(portal->cursorOptions & CURSOR_OPT_HOLD))
while ((hentry = (PortalHashEnt *) hash_seq_search(&status)) != NULL)
{
- Portal portal = hentry->portal;
+ Portal portal = hentry->portal;
/*
* Let's just make sure no one's active...
portal->portalActive = false;
/*
- * Do nothing else to cursors held over from a previous transaction.
- * (This test must include checking CURSOR_OPT_HOLD, else we will
- * fail to clean up a VACUUM portal if it fails after its first
- * sub-transaction.)
+ * Do nothing else to cursors held over from a previous
+ * transaction. (This test must include checking CURSOR_OPT_HOLD,
+ * else we will fail to clean up a VACUUM portal if it fails after
+ * its first sub-transaction.)
*/
if (portal->createXact != xact &&
(portal->cursorOptions & CURSOR_OPT_HOLD))