Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdFaM-004cSH-Bd for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 20:22:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rdFaK-00DsWV-SP for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 20:22:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdFX4-00DmTr-Ur for pgsql-hackers@lists.postgresql.org; Thu, 22 Feb 2024 20:19:04 +0000 Received: from wfout3-smtp.messagingengine.com ([64.147.123.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdFX0-000UCY-Gq for pgsql-hackers@postgresql.org; Thu, 22 Feb 2024 20:19:02 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id 393011C000A2; Thu, 22 Feb 2024 15:18:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 22 Feb 2024 15:18:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708633135; x= 1708719535; bh=MO+nc+JZCqH2b59zOKtOGKLl/3JFpQ6dituutLuIbQQ=; b=B jB4ACLaM9tgGxDjkf9PtM3yJ2/O+KXZMAQ+1xRAaDjf1Yf4gC7pDhrozJd1aGDfQ brN+2H5NEhebRhKg29AL/HIcUH6Hnk18IhSErSkqLFt7szMvwiRER/SjaWLgF+QD ojcA2Yr1Y4hNLL2GQZA1EssoUPwnyYUpIRsOfzGEeli3zTPt9I2too1i5BsBrvcC Y960FA7du7gu6HWJ1tS3W+RdKES4gVg4WojSXOF2GFVZ+tE5DHvYqmG38B5W1Inu og+GScfVp1szqvyg4hk5eO2x80suYaqMT4Uvyze7rlx3pQgG19NTZLwtXpmYi0t6 S6VoVjdta6KoquEGwGUnw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeggddufeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesmhekreertddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudelkeekgfdttdettdekgfduvdeiffelteegjeeihfet heekveeftedtuddvhfeunecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Feb 2024 15:18:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1708534387; bh=uyk7W4lEqYLpFlkUpguaMazWvoR1BRM6XaG4JX1EQYk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PDCYltPX56FAzdLi+ck/bDfzEP/RzUVawVkaf+mN5zvB6nY6Jrgay1bt0plgBNQ/R pQgsYKYtLHNMCf6QKnOkgs/M9WhMpX33hiIX17hc9q8gNVwyaIsmz+5sI3J/ZDa7Uj FG34stAEvmAzR3++N7ybJs3wPLB/46nIQREAJ4Yjo8wTDZvVNQ6qoOhHj40lSmtcgN FP8fYhB0PJohm1NfT3QlJvYD43Z1AcG+OhIJbl4iUGfuCtwoOAkfnS4FhreZSIznrX fk2wXuI2dMx+iGaVAynfQXrJ/TQY/POp1YiSrT5A6NNnSuIPToRctz5SRliVygcSZF IT33SO0YXOldg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 5161AD64; Wed, 21 Feb 2024 17:53:07 +0100 (CET) Date: Wed, 21 Feb 2024 17:53:07 +0100 From: Alvaro Herrera To: Tom Lane Cc: Alena Rybakina , Pgsql Hackers , Amit Langote Subject: Re: Running the fdw test from the terminal crashes into the core-dump Message-ID: <202402211653.zuh6objy3z72@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="z3zryrahxzakzjzm" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <223330.1708458481@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --z3zryrahxzakzjzm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2024-Feb-20, Tom Lane wrote: > > So, this means we can fix this by simply requiring ACL_SELECT privileges > > on a DO NOTHING action. We don't need to request specific privileges on > > any particular column (perminfo->selectedCols continues to be the empty > > set) -- which means that any role that has privileges on *any* column > > would get a pass. > > LGTM. Thanks for looking! After having pushed that, I wonder if we should document this. It seems quite the minor thing, but I'm sure somebody will complain if we don't. I propose the attached. (Extra context so that the full paragraph can be read from the comfort of your email program.) (While at it, I found the placement of the previous-to-last sentence in that paragraph rather strange, so I moved it to the end.) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Sallah, I said NO camels! That's FIVE camels; can't you count?" (Indiana Jones) --z3zryrahxzakzjzm Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="mergepriv-doc.patch" diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index 655f7dcc05..85938eda07 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -97,26 +97,29 @@ DELETE There is no separate MERGE privilege. If you specify an update action, you must have the UPDATE privilege on the column(s) of the target_table_name that are referred to in the SET clause. If you specify an insert action, you must have the INSERT privilege on the target_table_name. If you specify a delete action, you must have the DELETE privilege on the target_table_name. - Privileges are tested once at statement start and are checked - whether or not particular WHEN clauses are executed. You will require the SELECT privilege on any column(s) of the data_source and target_table_name referred to - in any condition or expression. + in any condition or expression; + in addition, if a DO NOTHING action is specified, you + will require the SELECT privilege on at least one column + of target_table_name. + Privileges are tested once at statement start and are checked + whether or not particular WHEN clauses are executed. MERGE is not supported if the target_table_name is a materialized view, foreign table, or if it has any rules defined on it. --z3zryrahxzakzjzm--