Skip to content

Commit 5134e9d

Browse files
committed
doc: FOR UPDATE / KEY / SHARE / KEY SHARE takes an table alias
Previously only a table name was documented for this SELECT clause. Reported-by: robert <lists@humanleg.org.uk> Discussion: https://postgr.es/m/152483686904.19805.3369061025704720797@wrigleys.postgresql.org Backpatch-through: master
1 parent 651030a commit 5134e9d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

doc/src/sgml/ref/select.sgml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
4545
[ LIMIT { <replaceable class="parameter">count</replaceable> | ALL } ]
4646
[ OFFSET <replaceable class="parameter">start</replaceable> [ ROW | ROWS ] ]
4747
[ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] { ROW | ROWS } { ONLY | WITH TIES } ]
48-
[ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
48+
[ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
4949

5050
<phrase>where <replaceable class="parameter">from_item</replaceable> can be one of:</phrase>
5151

@@ -1577,7 +1577,7 @@ FETCH { FIRST | NEXT } [ <replaceable class="parameter">count</replaceable> ] {
15771577
The locking clause has the general form
15781578

15791579
<synopsis>
1580-
FOR <replaceable>lock_strength</replaceable> [ OF <replaceable class="parameter">table_name</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ]
1580+
FOR <replaceable>lock_strength</replaceable> [ OF <replaceable class="parameter">from_reference</replaceable> [, ...] ] [ NOWAIT | SKIP LOCKED ]
15811581
</synopsis>
15821582

15831583
where <replaceable>lock_strength</replaceable> can be one of
@@ -1591,8 +1591,11 @@ KEY SHARE
15911591
</para>
15921592

15931593
<para>
1594-
For more information on each row-level lock mode, refer to
1595-
<xref linkend="locking-rows"/>.
1594+
<replaceable class="parameter">from_reference</replaceable> must be a
1595+
table <replaceable class="parameter">alias</replaceable> or non-hidden
1596+
<replaceable class="parameter">table_name</replaceable> referenced
1597+
in the <literal>FROM</literal> clause. For more information on each
1598+
row-level lock mode, refer to <xref linkend="locking-rows"/>.
15961599
</para>
15971600

15981601
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy