Обсуждение: Minor fixes for couple some comments around MERGE RETURNING
I noticed that PlannedStmt.hasReturning and hasModifyingCTE have an outdated comment now that MERGE supports RETURNING (per commit c649fa24a) i.e. these two: > bool hasReturning; /* is it insert|update|delete RETURNING? */ > bool hasModifyingCTE; /* has insert|update|delete in WITH? */ transformWithClause() has: /* must be a data-modifying statement */ Assert(IsA(cte->ctequery, InsertStmt) || IsA(cte->ctequery, UpdateStmt) || IsA(cte->ctequery, DeleteStmt) || IsA(cte->ctequery, MergeStmt)); pstate->p_hasModifyingCTE = true; which eventually makes it into PlannedStmt.hasModifyingCTE. The attached trivial patch fixes these. David
Вложения
On Sun, 19 May 2024 at 15:20, David Rowley <dgrowleyml@gmail.com> wrote: > > I noticed that PlannedStmt.hasReturning and hasModifyingCTE have an > outdated comment now that MERGE supports RETURNING (per commit > c649fa24a) > > i.e. these two: > > > bool hasReturning; /* is it insert|update|delete RETURNING? */ > > > bool hasModifyingCTE; /* has insert|update|delete in WITH? */ I've pushed the fix for that. David
On Thu, 23 May 2024 at 04:26, David Rowley <dgrowleyml@gmail.com> wrote: > > On Sun, 19 May 2024 at 15:20, David Rowley <dgrowleyml@gmail.com> wrote: > > > > I noticed that PlannedStmt.hasReturning and hasModifyingCTE have an > > outdated comment now that MERGE supports RETURNING (per commit > > c649fa24a) > > > > i.e. these two: > > > > > bool hasReturning; /* is it insert|update|delete RETURNING? */ > > > > > bool hasModifyingCTE; /* has insert|update|delete in WITH? */ > > I've pushed the fix for that. > Thanks for taking care of that. I found another couple of similar comments that also needed updating, so I've pushed a fix for them too. Regards, Dean