Re: [DOCS] Row locking within a SELECT statement

2016-08-16 Thread Tom Lane
x...@linux.gr writes: > In order to avoid concurrent manipulation of rows, I do issue a "SELECT > .. > FOR UPDATE" on the sets of rows, before UPDATEing them (because UPDATEs > cannot be ordered). > transaction A { > SELECT .. FROM alerts WHERE FOR UPDATE; > ... decide ... > UPDATE aler

Re: [DOCS] Row locking within a SELECT statement

2016-08-16 Thread P. Christeas
Στις Τρι 16 Αυγ 2016 11:23:59 π.μ. Marko Tiikkaja έγραψε: > On 2016-08-16 08:19, x...@linux.gr wrote: > > In order to avoid concurrent manipulation of rows, I do issue a > > "SELECT .. FOR UPDATE" on the sets of rows, before UPDATEing > > them (because UPDATEs cannot be ordered). > > Yeah, but FOR

Re: [DOCS] Row locking within a SELECT statement

2016-08-16 Thread Marko Tiikkaja
On 2016-08-16 08:19, x...@linux.gr wrote: In order to avoid concurrent manipulation of rows, I do issue a "SELECT .. FOR UPDATE" on the sets of rows, before UPDATEing them (because UPDATEs cannot be ordered). Yeah, but FOR UPDATEs are not ordered either unless you use ORDER BY, which you didn'