Alvaro Herrera <alvhe...@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
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 <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>