On 2022-Mar-07, Zhihong Yu wrote:
> For v13-0003-MERGE-SQL-Command-following-SQL-2016.patch :
>
> + * Reset per-tuple memory context to free any expression evaluation
> + * storage allocated in the previous cycle.
> + */
> + ResetExprContext(econtext);
>
> Why is the memory cleanup done in the next cycle ? Can the cleanup be done
> at the end of the current cycle ?
I have removed that, because Andres had already pointed out that it was
redundant with the reset done in the caller.
> + * XXX Should this explain why MERGE has the same logic as UPDATE?
>
> I think explanation should be given.
Actually, the routine in question is only handling insert, not UPDATE,
so MERGE is not relevant to the function. I have removed the comment.
This was probably a leftover from work prior to 86dc90056dfd; that
commit made it all irrelevant.
--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/
"Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)