bug-19026-alternative-1.patch
text/x-diff
Filename: bug-19026-alternative-1.patch
Type: text/x-diff
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/executor/functions.c | 8 | 1 |
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 359aafea681..08cf9dce2af 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -612,7 +612,14 @@ init_sql_fcache(FunctionCallInfo fcinfo, bool lazyEvalOK) fcache->lazyEvalOK = lazyEvalOK; fcache->lazyEval = false; - /* Also reset data about where we are in the function. */ + /* + * Also reset data about where we are in the function. Notice we just + * clear cplan without doing ReleaseCachedPlan. The only way that cplan + * could be non-NULL here is if we errored out of a previous execution of + * this SQLFunctionCache, in which case error abort would have released + * the plan reference, so we mustn't do so again. + */ + fcache->cplan = NULL; fcache->eslist = NULL; fcache->next_query_index = 0; fcache->error_query_index = 0;