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 1ovizJ-0001lZ-03 for pgsql-docs@arkaria.postgresql.org; Thu, 17 Nov 2022 17:47:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ovizH-0000El-T8 for pgsql-docs@arkaria.postgresql.org; Thu, 17 Nov 2022 17:47:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovizH-0000EX-LL for pgsql-docs@lists.postgresql.org; Thu, 17 Nov 2022 17:47:43 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovizF-0000RT-0a for pgsql-docs@lists.postgresql.org; Thu, 17 Nov 2022 17:47:42 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 74E555C07F4; Thu, 17 Nov 2022 12:47:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 17 Nov 2022 12:47:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1668707260; x=1668793660; bh=RUj09UI8KWbnx lpPAYCicbGO+xRebcMWvs7aal3nZwg=; b=pP2kGWmxgTJc3qV8Nwu2KWecXqQun sImbAjFUHYRrVJWLihHqeEaO+1BKmZxocd4biUIEOSaZyO+NwYXOQpWruAepW7UC jUksJO7T/nrIS8WouCh7ZILjTMOyl0niXhgyeICMKILbHo20FPjHOcAYrTRazbzJ 5+nYR5vrx77CNo6B0DkXBPl7FEidAfffH02mC+/E9c+Ipde9W51wHle/XNKtmrAR 1Dh94Tf7Q+kth0yLqmmVPXXr7AcsiXF6tRQ06J6nLGpE/bkjDrgkxYSJD56XhTZS /P8owFoyjinYccKhjuMWYJxWre2cj5ArVTbqJnJqBH+epNCvFv9uQh3Jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgeekgddutdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjgesthekre dttddtjeenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepleefkefhgfelte eigeejkedvjedvlefhueehfedvjeehueetveetjeekueffgfehnecuffhomhgrihhnpehp ohhsthhgrhgvshhqlhdrohhrghdpvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Nov 2022 12:47:40 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1A5FF39C; Thu, 17 Nov 2022 18:47:37 +0100 (CET) Date: Thu, 17 Nov 2022 18:47:37 +0100 From: Alvaro Herrera To: bobocc@yahoo.com, pgsql-docs@lists.postgresql.org Subject: Re: Merge statement Message-ID: <20221117174737.w7jhwzarwmudolue@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <166870559096.639.9180457099983661630@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Nov-17, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/15/sql-merge.html > Description: > > From the description it looks like a single WHEN clause is accepted, which > is definitely not true. Hmm, the main synopsis has when_clause [...] where the [...] is there to indicate that when_clause can appear an arbitrary number of times. > Please let us know how many WHEN clauses are accepted for each of WNEM > MATCHED and WHEN NOT MATCHED. There's no specific restriction, although I didn't try to find a limit. I wonder what happens if you have a few hundred thousand ... Time to experiment, I guess. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "No deja de ser humillante para una persona de ingenio saber que no hay tonto que no le pueda enseñar algo." (Jean B. Say)