Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5134e9d

Browse filesBrowse 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
Copy full SHA for 5134e9d

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed

‎doc/src/sgml/ref/select.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ref/select.sgml
+7-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.