From: Bruce Momjian Date: Fri, 8 Dec 2023 00:43:04 +0000 (-0500) Subject: doc: FOR UPDATE / KEY / SHARE / KEY SHARE takes an table alias X-Git-Tag: REL_17_BETA1~1320 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5134e9d295f335b4ee9f8846f934e5593f65e881;p=thirdparty%2Fpostgresql.git 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 Discussion: https://postgr.es/m/152483686904.19805.3369061025704720797@wrigleys.postgresql.org Backpatch-through: master --- diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 227ba1993bb..9917df7839b 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -45,7 +45,7 @@ SELECT [ ALL | DISTINCT [ ON ( expressioncount | ALL } ] [ OFFSET start [ ROW | ROWS ] ] [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES } ] - [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF table_name [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ] + [ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF from_reference [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ] where from_item can be one of: @@ -1577,7 +1577,7 @@ FETCH { FIRST | NEXT } [ count ] { The locking clause has the general form -FOR lock_strength [ OF table_name [, ...] ] [ NOWAIT | SKIP LOCKED ] +FOR lock_strength [ OF from_reference [, ...] ] [ NOWAIT | SKIP LOCKED ] where lock_strength can be one of @@ -1591,8 +1591,11 @@ KEY SHARE - For more information on each row-level lock mode, refer to - . + from_reference must be a + table alias or non-hidden + table_name referenced + in the FROM clause. For more information on each + row-level lock mode, refer to .