From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Daniel Westermann <dwe@dbi-services.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Japin Li <japinli@hotmail.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>
Subject: Re: support for MERGE
Date: Wed, 9 Mar 2022 14:44:42 -0300
Message-ID: <202203091744.o27bb2gpex2j@alvherre.pgsql> (raw)
In-Reply-To: <CALNJ-vTXOu5Nfji-kjgvJ58uZN5d8gUZcG+UTto=40oE5B_nQg@mail.gmail.com>
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, zyu@yugabyte.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, simon.riggs@enterprisedb.com, tomas.vondra@enterprisedb.com, dwe@dbi-services.com, amitlangote09@gmail.com, pryzby@telsasoft.com, japinli@hotmail.com, er@xs4all.nl, jcasanov@systemguards.com.ec
Subject: Re: support for MERGE
In-Reply-To: <202203091744.o27bb2gpex2j@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox