From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Minor fixes for couple some comments around MERGE RETURNING |
Date: | 2024-05-19 03:20:53 |
Message-ID: | CAApHDvpqp6vtUzG-_josUEiBGyqnrnVxJ-VdF+hJLXjHdHzsyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
merge_returning_comments.patch | application/octet-stream | 634 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2024-05-19 03:53:38 | Re: First draft of PG 17 release notes |
Previous Message | David Rowley | 2024-05-19 01:51:51 | Re: generic plans and "initial" pruning |