Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIWn6-0006Ov-B2 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Aug 2022 14:53:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oIWn4-0003D5-F3 for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Aug 2022 14:53:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIWn4-0003Cw-1z for pgsql-hackers@lists.postgresql.org; Mon, 01 Aug 2022 14:53:06 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oIWmz-00042c-CZ for pgsql-hackers@lists.postgresql.org; Mon, 01 Aug 2022 14:53:05 +0000 Received: by mail-qv1-xf33.google.com with SMTP id ct13so4904031qvb.9 for ; Mon, 01 Aug 2022 07:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc; bh=Z59uCYPF56oyAT6eR3LUEBOs44gaUOD5eOsi5RmSV2U=; b=T63xej57ndllQhKOo7ZB4qPIXzumXEdjPfv6R/kBvkkz3E5XLO9+7lwayUp69d7RV+ 3pK8XwVi6lJQeL0bm0Itj/ygJ+T1ZkexW2LzgApeBz2eB131jd5mQW/wpN0Hy909iN7c ICw8AN0qoL/cWRaDycss7RO+z0QBEbGQYAGC492iCbIjNyOcn9i64R3mzsJFQg3njXQV lXW5rI9FcNaqM5Mu4n5u9fCyhrM+sNujesOn6I8KAKDBFezmzo2tz6pwqKFfmHUw9Qdz pnLxk2/y9lhzdXwTNw+t1D9Il8oNMKJ/VdnKqf+8BUpbWEPK/D35gTGVa1HLWxeiF/Qr CYCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc; bh=Z59uCYPF56oyAT6eR3LUEBOs44gaUOD5eOsi5RmSV2U=; b=dJu5ZioS2wqaf6XY6Ty5zfE+C/RjIfZoiCextDXRpJw8hsjoeNwG4/iICbyqIxN9gs XL8Cr9IFcSJYxP0wjVFSkd1HW7zetEJWA4RHTJPt/4NH1VkKLNj+1RqiBQ4gXmYO7pPb +cY0Jt07PB4E4dz5HBsujqwvSB6tumulTnM6f9uV3R0hHX7m8sa7HkEXVeOIJthCiGxJ g6zWcW0WUddKm1wI0HZoRa1OxTJZOCrmlLktDBjjQjValJfqm5hPhoCxEnZrhfCrF043 VSI0fUIdYHI17RAYtOJ7c6iEIE3EHbXDrv4pV3a5qZ/p72bGjr05g+vkOp9uYr9Pgseo qUYw== X-Gm-Message-State: ACgBeo0tteZvZsS1p/+wUKugS31H+cnkYauTJa2eZAdlHTNZMdrAsQMU kx/OrR1PxRWjry5CJfoD0/X9Zg== X-Google-Smtp-Source: AA6agR54bLkQjKlNR2eM1PGypTVFoaTEcRvsdtxCUWy2S036Ms2x3wkrN5wcg4aYsq36p8krvJmZbA== X-Received: by 2002:a0c:b444:0:b0:474:90b:67d7 with SMTP id e4-20020a0cb444000000b00474090b67d7mr14655510qvf.124.1659365579445; Mon, 01 Aug 2022 07:52:59 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id m12-20020ac807cc000000b00304f3e320f2sm7119035qth.4.2022.08.01.07.52.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2022 07:52:58 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 7121E8007F5; Mon, 1 Aug 2022 09:52:57 -0500 (CDT) Date: Mon, 1 Aug 2022 09:52:57 -0500 From: Justin Pryzby To: =?iso-8859-1?Q?=C1lvaro?= Herrera Cc: Peter Eisentraut , Amit Langote , Japin Li , Zhihong Yu , Simon Riggs , pgsql-hackers@lists.postgresql.org, Tomas Vondra , Daniel Westermann , Erik Rijkers , Jaime Casanova , Andres Freund Subject: Re: support for MERGE Message-ID: <20220801145257.GA15006@telsasoft.com> References: <202206011528.j2i6c64v7yqs@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jun 14, 2022 at 11:27:06AM +0200, Álvaro Herrera wrote: > @@ -448,9 +448,9 @@ COMMIT; > and execute the first one that succeeds. > If MERGE attempts an INSERT > and a unique index is present and a duplicate row is concurrently > - inserted, then a uniqueness violation is raised. > - MERGE does not attempt to avoid the > - error by executing an UPDATE. > + inserted, then a uniqueness violation error is raised; > + MERGE does not attempt to avoid such > + errors by evaluating MATCHED conditions. This was a portion of a chang that was committed as ffffeebf2. But I don't understand why this changed from "does not attempt to avoid the error by executing an UPDATE." to "...by evaluating MATCHED conditions." Maybe it means to say "..by re-starting evaluation of match conditions". Sorry to re-raise this 6 weeks later.. -- Justin