On Tue, Dec 5, 2017 at 7:24 AM, Amit Kapila <amit.kapil...@gmail.com> wrote:
> + EState *estate = gatherstate->ps.state;
> +
> + /* Install our DSA area while executing the plan. */
> + estate->es_query_dsa = gatherstate->pei->area;
>   outerTupleSlot = ExecProcNode(outerPlan);
> + estate->es_query_dsa = NULL;
>
> Won't the above coding pattern create a problem, if ExecProcNode
> throws an error and outer block catches it and continues execution
> (consider the case of execution inside PL blocks)?

I don't see what the problem is.  The query that got aborted by the
error wouldn't be sharing an EState with one that didn't.  Control
would have to return to someplace inside the same ExecProcNode and it
would have to return normally.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Reply via email to