On Mon, Nov 20, 2023 at 07:19:39PM -0700, David G. Johnston wrote: > The placement in the numbered listing section feels wrong, I am OK with > the wording. It should be down in the clause details. > > FOR lock_strength [ OF from_reference [, ...] ] [ NOWAIT | SKIP LOCKED ] -- > need to change this spot to match > > where lock_strength can be one of > > [...] > > + and from_reference must be a table alias or non-hidden table_name referenced > in the FROM clause. > > For more information on each [...]
Ah, good point. I was searching for "FOR UPDATE" so I missed that section; updated patch attached. -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 227ba1993b..9917df7839 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -45,7 +45,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac [ LIMIT { <replaceable class="parameter">count</replaceable> | ALL } ] [ OFFSET <replaceable class="parameter">start</replaceable> [ ROW | ROWS ] ] [ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { ROW | ROWS } { ONLY | WITH TIES } ] - [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ] + [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ] <phrase>where <replaceable class="parameter">from_item</replaceable> can be one of:</phrase> @@ -1577,7 +1577,7 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { The locking clause has the general form <synopsis> -FOR <replaceable>lock_strength</replaceable> [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] +FOR <replaceable>lock_strength</replaceable> [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] </synopsis> where <replaceable>lock_strength</replaceable> can be one of @@ -1591,8 +1591,11 @@ KEY SHARE </para> <para> - For more information on each row-level lock mode, refer to - <xref linkend="locking-rows"/>. + <replaceable class="parameter">from_reference</replaceable> must be a + table <replaceable class="parameter">alias</replaceable> or non-hidden + <replaceable class="parameter">table_name</replaceable> referenced + in the <literal>FROM</literal> clause. For more information on each + row-level lock mode, refer to <xref linkend="locking-rows"/>. </para> <para>