Re: MERGE ... WHEN NOT MATCHED BY SOURCE
| От | Dean Rasheed |
|---|---|
| Тема | Re: MERGE ... WHEN NOT MATCHED BY SOURCE |
| Дата | |
| Msg-id | CAEZATCUBUHwdfks-jFGSk0+KgaGFLRB-qLB36X4tudQaaSCm7Q@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: MERGE ... WHEN NOT MATCHED BY SOURCE (Dean Rasheed <dean.a.rasheed@gmail.com>) |
| Ответы |
Re: MERGE ... WHEN NOT MATCHED BY SOURCE
|
| Список | pgsql-hackers |
On Wed, 13 Mar 2024 at 14:32, Dean Rasheed <dean.a.rasheed@gmail.com> wrote: > > Rebased version attached. > Rebased version attached, on top of c649fa24a4 (MERGE ... RETURNING support). Aside from some cosmetic stuff, I've updated several tests to test this together with RETURNING. The updated isolation test tests the new interesting case where a concurrent update causes a matched case to become not matched, and there are both NOT MATCHED BY SOURCE and NOT MATCHED BY TARGET actions to execute, and RETURNING is specified so that it is forced to defer the NOT MATCHED BY TARGET action until the next invocation of ExecModifyTable(), in order to return the rows from both not matched actions. I also tried to tidy up ExecMergeMatched() a little --- since we know that it's only ever called with matched = true, it's simpler to just Assert that at the top, and then only touch it in the few cases where it needs to be changed to false. A lot of the updates are comment updates, to try to make it clearer how concurrent updates are handled, since that's a little more complex with this patch. Regards, Dean
Вложения
В списке pgsql-hackers по дате отправления: