It was missing lock levels FOR KEY SHARE and FOR NO KEY EXCLUSIVE; but
also SELECT FOR UPDATE is not a command separate from SELECT, as the
original text implied. It is clearer to state that FOR
is an option of regular SELECT.
Per suggestion from Joey Bodoia
Reviewed-by: Joey Bodoia (offlist)
Reviewed-by: Erikjan Rijkers
Discussion: https://postgr.es/m/164908765512 .682.17348032020747341013 @wrigleys.postgresql.org
- The SELECT FOR UPDATE and
- SELECT FOR SHARE commands acquire a
- lock of this mode on the target table(s) (in addition to
- ACCESS SHARE locks on any other tables
- that are referenced but not selected
- FOR UPDATE/FOR SHARE ).
+ The SELECT command acquires a lock of this mode
+ on all tables on which one of the FOR UPDATE ,
+ FOR NO KEY UPDATE ,
+ FOR SHARE , or
+ FOR KEY SHARE options is specified
+ (in addition to ACCESS SHARE locks on any other
+ tables that are referenced without any explicit
+ FOR ... locking option).