Re: support for MERGE

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: support for MERGE
Дата
Msg-id 202201211537.veim2rt3asdb@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: support for MERGE  (Japin Li <japinli@hotmail.com>)
Список pgsql-hackers
On 2022-Jan-21, Japin Li wrote:

> +               /*
> +                * NOT MATCHED actions can't see target relation, but they can see
> +                * source relation.
> +                */
> +               Assert(mergeWhenClause->commandType == CMD_INSERT ||
> +                          mergeWhenClause->commandType == CMD_DELETE ||
> +                          mergeWhenClause->commandType == CMD_NOTHING);
> +               setNamespaceVisibilityForRTE(pstate->p_namespace,
> +                                                                        targetRelRTE, false, false);
> +               setNamespaceVisibilityForRTE(pstate->p_namespace,
> +                                                                        sourceRelRTE, true, true);
> 
> Should we remove the CMD_DELETE from Assert(), since it will not happened
> according to MERGE syntax?

Absolutely --- silly copy&paste mistake.  Pushed fix.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"Ni aún el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: New developer papercut - Makefile references INSTALL
Следующее
От: Josef Šimánek
Дата:
Сообщение: Re: New developer papercut - Makefile references INSTALL