Re: support for MERGE - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: support for MERGE
Date
Msg-id 202111122313.fjhecfq6yi2v@alvherre.pgsql
Whole thread Raw
In response to Re: support for MERGE  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: support for MERGE
List pgsql-hackers
On 2021-Nov-12, Zhihong Yu wrote:

> Hi,
> 
> +           skipped_path = total - insert_path - update_path - delete_path;
> 
> Should there be an assertion that skipped_path is not negative ?

Hm, yeah, added.

> +    * We maintain separate transaction tables for UPDATE/INSERT/DELETE since
> +    * MERGE can run all three actions in a single statement. Note that UPDATE
> +    * needs both old and new transition tables
> 
> Should the 'transaction' in the first line be transition ?

Oh, of course.

Uploaded fixup commits to
https://github.com/alvherre/postgres/commits/merge-15

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: ALTER TABLE DETACH PARTITION violates serializability
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLE DETACH PARTITION violates serializability