-/*
- * NOTES
- * Do not confuse "Portal" with "PortalEntry" (or "PortalBuffer").
- * When a PQexec() routine is run, the resulting tuples
- * find their way into a "PortalEntry". The contents of the resulting
- * "PortalEntry" can then be inspected by other PQxxx functions.
- *
- * A "Portal" is a structure used to keep track of queries of the
- * form:
- * retrieve portal FOO ( blah... ) where blah...
- *
- * When the backend sees a "retrieve portal" query, it allocates
- * a "PortalD" structure, plans the query and then stores the query
- * in the portal without executing it. Later, when the backend
- * sees a
- * fetch 1 into FOO
- *
- * the system looks up the portal named "FOO" in the portal table,
- * gets the planned query and then calls the executor with a feature of
- * '(EXEC_FOR 1). The executor then runs the query and returns a single
- * tuple. The problem is that we have to hold onto the state of the
- * portal query until we see a "close p". This means we have to be
- * careful about memory management.
- *
- * Having said all that, here is what a PortalD currently looks like:
- *
- * struct PortalD {
- * char* name;
- * classObj(PortalVariableMemory) variable;
- * classObj(PortalHeapMemory) heap;
- * List queryDesc;
- * EState state;
- * void (*cleanup) ARGS((Portal portal));
- * };
- *
- * I hope this makes things clearer to whoever reads this -cim 2/22/91
- *
- * Here is an old comment taken from nodes/memnodes.h
- *
- * MemoryContext
- * A logical context in which memory allocations occur.
- *
- * The types of memory contexts can be thought of as members of the
- * following inheritance hierarchy with properties summarized below.
- *
- * Node
- * |
- * MemoryContext___
- * / \
- * GlobalMemory PortalMemoryContext
- * / \
- * PortalVariableMemory PortalHeapMemory
- *
- * Flushed at Flushed at Checkpoints
- * Transaction Portal
- * Commit Close
- *
- * GlobalMemory n n n
- * PortalVariableMemory n y n
- * PortalHeapMemory y y y *
- *
- */
-#include <stdio.h> /* for sprintf() */
-#include <string.h> /* for strlen, strncpy */
-