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 1rdIns-004sI0-1B for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 23:48:36 +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 1rdInp-00Er4e-RH for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Feb 2024 23:48:34 +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 1rdInp-00Er3N-He for pgsql-hackers@lists.postgresql.org; Thu, 22 Feb 2024 23:48:34 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdIni-000Vfh-Hy for pgsql-hackers@postgresql.org; Thu, 22 Feb 2024 23:48:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 41MNmK99708234; Thu, 22 Feb 2024 18:48:20 -0500 From: Tom Lane To: Alvaro Herrera cc: Alena Rybakina , Pgsql Hackers , Amit Langote Subject: Re: Running the fdw test from the terminal crashes into the core-dump In-reply-to: <202402211653.zuh6objy3z72@alvherre.pgsql> References: <202402211653.zuh6objy3z72@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 21 Feb 2024 17:53:07 +0100" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <708173.1708645648.0@sss.pgh.pa.us> Date: Thu, 22 Feb 2024 18:48:20 -0500 Message-ID: <708233.1708645700@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <708173.1708645648.1@sss.pgh.pa.us> Alvaro Herrera writes: > 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. Yup, no doubt. > I propose the attached. (Extra context so that the full paragraph can > be read from the comfort of your email program.) This reads awkwardly to me. I think it'd be better to construct it so that DO NOTHING's requirement is stated exactly parallel to the other three clause types, more or less as attached. > (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.) Agreed, and done in my version too. BTW, if you read it without paying attention to markup, you'll notice that we are saying things like If you specify an insert action, you must have the INSERT privilege on the target_table_name. which is fairly nonsensical: we don't define privileges on the name of something. While I've not done anything about that here, I wonder if we shouldn't just write "privilege on the target table" without any special markup. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="merge-privilege-doc.patch"; charset="us-ascii" Content-ID: <708173.1708645648.2@sss.pgh.pa.us> Content-Description: merge-privilege-doc.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index 655f7dcc05..79ebff1033 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -104,12 +104,15 @@ DELETE 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) + If you specify a DO NOTHING action, you must have + the SELECT privilege on at least one column + of target_table_name. + You will also need SELECT privilege on any column(s= ) of the data_source and target_table_name refer= red to in any condition or expression. + Privileges are tested once at statement start and are checked + whether or not particular WHEN clauses are executed= . = ------- =_aaaaaaaaaa0--