mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Skip unnecessary plan-copying now that plan trees are read-only in the
executor.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.81 2002/12/15 21:01:34 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.82 2002/12/17 15:51:59 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -219,9 +219,6 @@ SPI_execp(void *plan, Datum *Values, char *Nulls, int tcount)
|
|||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
/* copy plan to current (executor) context */
|
|
||||||
plan = (void *) _SPI_copy_plan(plan, _SPI_CPLAN_CURCXT);
|
|
||||||
|
|
||||||
res = _SPI_execute_plan((_SPI_plan *) plan, Values, Nulls, tcount);
|
res = _SPI_execute_plan((_SPI_plan *) plan, Values, Nulls, tcount);
|
||||||
|
|
||||||
_SPI_end_call(true);
|
_SPI_end_call(true);
|
||||||
@ -1480,7 +1477,7 @@ _SPI_copy_plan(_SPI_plan *plan, int location)
|
|||||||
parentcxt = _SPI_current->procCxt;
|
parentcxt = _SPI_current->procCxt;
|
||||||
else if (location == _SPI_CPLAN_TOPCXT)
|
else if (location == _SPI_CPLAN_TOPCXT)
|
||||||
parentcxt = TopMemoryContext;
|
parentcxt = TopMemoryContext;
|
||||||
else
|
else /* (this case not currently used) */
|
||||||
parentcxt = CurrentMemoryContext;
|
parentcxt = CurrentMemoryContext;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user