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 1ovjBz-0002Sx-5o for pgsql-general@arkaria.postgresql.org; Thu, 17 Nov 2022 18:00:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ovjBy-0002f7-1v for pgsql-general@arkaria.postgresql.org; Thu, 17 Nov 2022 18:00:50 +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 1ovj8t-0005F4-OF for pgsql-general@lists.postgresql.org; Thu, 17 Nov 2022 17:57:39 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovj8r-0003Y0-57 for pgsql-general@lists.postgresql.org; Thu, 17 Nov 2022 17:57:39 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9E1355C07F5; Thu, 17 Nov 2022 12:57:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 17 Nov 2022 12:57:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1668707855; x=1668794255; bh=L k1TmO7BC6XnmExxwISii8g80TQj5ZQPnyM7b5xyZkI=; b=boLWQg0hNRdu3s5ln bgXGbIKcnOWfwkxMcBgdAMNtCktUdH5WkN0PdSiqnjouQI5YHnXflCVs0DfDsA92 c0msJynyoqcauktLxEYhD7Y4hBjoKZFN9T6Sa5xU+/LzS1aIeQUQVLJ58rFGZWaf 98C+uYmbDtAqDyNQ8LhidTOnbtzv0ACDIJ2Vlz2L+kTYieai7SwTXZrFe4ozxSCE TJv+Mos0BXqsZxMkpKw2lDuLt57eEY7GACvdoBXXIRUIN5sEHWH5xHpl0dKRW7k2 4pglAvpMN7reEKrKstU6r9WqEFXOKThjW2eGhR1OSYj4R0OFM9RIPvMrEJgPvPat I3tdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgeekgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Nov 2022 12:57:35 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 45FC439C; Thu, 17 Nov 2022 18:57:33 +0100 (CET) Date: Thu, 17 Nov 2022 18:57:33 +0100 From: Alvaro Herrera To: Luca Ferrari Cc: pgsql-general Subject: Re: MERGE output doubt Message-ID: <20221117175733.yd3g5usesadm5sg3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221117113651.wlgmdrx653tqihzt@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Nov-17, Alvaro Herrera wrote: > On 2022-Oct-20, Luca Ferrari wrote: > > > I was expecting an output tag like "MERGE 0" since both branches have > > "do nothing", so no tuples should be updated at all on the target > > table. > > Hmm, yeah, it should report 0 tuples, according to the documentation. > AFAICS this patch fixes it, will push shortly. Pushed, thanks for reporting. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Someone said that it is at least an order of magnitude more work to do production software than a prototype. I think he is wrong by at least an order of magnitude." (Brian Kernighan)