Does Postgresql apply the same type of locks on UPDATE with range condition and on UPDATE with in-set condition? Does Postgresql apply the same type of locks on UPDATE with a range condition and on UPDATE with in-set condition?

E.g. will the queries:


UPDATE table WHERE id IN (1,2,3,4,5,6,7,8,9,10);
UPDATE table WHERE id &gt;= 1 AND id &lt; 11;


Cause the same type of locks on table?
Yes, both statements will take a UPDATE lock on all the modified rows.

See the documentation on row locks:


  The FOR UPDATE lock mode is also acquired by any DELETE on a row, and also by an UPDATE that modifies the values on certain columns.