Re: MERGE ... RETURNING - Mailing list pgsql-hackers

From jian he
Subject Re: MERGE ... RETURNING
Date
Msg-id CACJufxGVOPj1p2HfDngx7OdovqOmX_ebjDfnQmrN-8y=MZ0+kw@mail.gmail.com
Whole thread Raw
In response to Re: MERGE ... RETURNING  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: MERGE ... RETURNING
List pgsql-hackers
On Fri, Jan 19, 2024 at 1:44 AM Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
>
> Thanks for reviewing. Updated patch attached.
>
> The wider question is whether people are happy with the overall
> approach this patch now takes, and the new MERGING() function and
> MergingFunc node.
>

one minor white space issue:

git diff --check
doc/src/sgml/func.sgml:22482: trailing whitespace.
+ action | clause_number | product_id | in_stock | quantity


@@ -3838,7 +3904,7 @@ ExecModifyTable(PlanState *pstate)
  }
  slot = ExecGetUpdateNewTuple(resultRelInfo, context.planSlot,
  oldSlot);
- context.relaction = NULL;
+ node->mt_merge_action = NULL;

I wonder what's the purpose of setting node->mt_merge_action to null ?
I add `node->mt_merge_action = NULL;` at the end of each branch in
`switch (operation)`.
All the tests still passed.
Other than this question, this patch is very good.



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Add recovery to pg_control and remove backup_label
Next
From: jian he
Date:
Subject: Re: SQL:2011 application time