Minor fixes for couple some comments around MERGE RETURNING

Поиск
Список
Период
Сортировка
От David Rowley
Тема Minor fixes for couple some comments around MERGE RETURNING
Дата
Msg-id CAApHDvpqp6vtUzG-_josUEiBGyqnrnVxJ-VdF+hJLXjHdHzsyQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Minor fixes for couple some comments around MERGE RETURNING
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: generic plans and "initial" pruning
Следующее
От: David Rowley
Дата:
Сообщение: Re: First draft of PG 17 release notes