Re: MERGE SQL statement for PG12

Поиск
Список
Период
Сортировка
От Mi Tar
Тема Re: MERGE SQL statement for PG12
Дата
Msg-id 154702129079.11631.12119543228296180998.pgcf@coridan.postgresql.org
обсуждение исходный текст
Ответ на Re: MERGE SQL statement for PG12  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Список pgsql-hackers
Hi!

Looking at the commitfest as a novice contributor I was searching for patches to review without any reviewers set. And
becauseI just spend some time and made a patch improving how REFRESH MATERIALIZED VIEW CONCURRENTLY works (does
INSERTs/UPDATEs/DELETEsinstead of just DELETEs/INSERTs) when I saw this patch I said to myself, great, MERGE is exactly
whatwould be needed there. Because we already have a merge implementation there (requiring unique columns). I didn't
knowthat I will discover such a long and beautiful thread.
 

So I will just add my 2c based on experience from REFRESH MATERIALIZED VIEW CONCURRENTLY work. I think that we would
needan additional statement-level trigger for MERGE, instead of it being exposed as INSERT, UPDATE, and DELETE
triggers.Because it is really tricky to make triggers work if you want to know how exactly the table as changed through
MERGEif this is split into three separate triggers and transient relations. If we do not have a new statement-level
triggerfor MERGE, then this is really just a syntactic sugar on top of INSERTs, UPDATEs, and DELETEs.
 


Mitar

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

Предыдущее
От: Mi Tar
Дата:
Сообщение: Re: [PATCH] Allow UNLISTEN during recovery
Следующее
От: Mi Tar
Дата:
Сообщение: Re: additional foreign key test coverage