Hi!

Looking at the commitfest as a novice contributor I was searching for patches 
to review without any reviewers set. And because I just spend some time and 
made a patch improving how REFRESH MATERIALIZED VIEW CONCURRENTLY works (does 
INSERTs/UPDATEs/DELETEs instead of just DELETEs/INSERTs) when I saw this patch 
I said to myself, great, MERGE is exactly what would be needed there. Because 
we already have a merge implementation there (requiring unique columns). I 
didn't know that 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 need an 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 MERGE if this is split into three 
separate triggers and transient relations. If we do not have a new 
statement-level trigger for MERGE, then this is really just a syntactic sugar 
on top of INSERTs, UPDATEs, and DELETEs.


Mitar

Reply via email to