From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Alena Rybakina <a.rybakina@postgrespro.ru>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Cc: Amit Langote <amitlangote09@gmail.com>
Subject: Re: Running the fdw test from the terminal crashes into the core-dump
Date: Thu, 22 Feb 2024 18:48:20 -0500
Message-ID: <708233.1708645700@sss.pgh.pa.us> (raw)
In-Reply-To: <202402211653.zuh6objy3z72@alvherre.pgsql>
References: <202402211653.zuh6objy3z72@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> 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
Attachments:merge-privilege-doc.patch (text/x-diff, 1.3K) downloaddiff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgmlindex 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 <replaceable class="parameter">target_table_name</replaceable>.
If you specify a delete action, you must have the <literal>DELETE</literal>
privilege on the <replaceable class="parameter">target_table_name</replaceable>.
- Privileges are tested once at statement start and are checked- whether or not particular <literal>WHEN</literal> clauses are executed.- You will require the <literal>SELECT</literal> privilege on any column(s)+ If you specify a <literal>DO NOTHING</literal> action, you must have+ the <literal>SELECT</literal> privilege on at least one column+ of <replaceable class="parameter">target_table_name</replaceable>.+ You will also need <literal>SELECT</literal> privilege on any column(s)
of the <replaceable class="parameter">data_source</replaceable> and
<replaceable class="parameter">target_table_name</replaceable> referred to
in any <literal>condition</literal> or <literal>expression</literal>.
+ Privileges are tested once at statement start and are checked+ whether or not particular <literal>WHEN</literal> clauses are executed.
</para>
<para>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, a.rybakina@postgrespro.ru, amitlangote09@gmail.com
Subject: Re: Running the fdw test from the terminal crashes into the core-dump
In-Reply-To: <708233.1708645700@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox