Re: [SQL] Simulating a SELECT..FOR UPDATE to LOCK and SELECT statement

2002-10-24 Thread Tom Lane
Ludwig Lim <[EMAIL PROTECTED]> writes: > Is there a way to emulate a SELECT..FOR UPDATE to > series of LOCK/SELECT statement. No. LOCK can only acquire table-level locks; the point of SELECT FOR UPDATE is to acquire row-level locks. >I am surprised because according to the docs > (version

[SQL] Simulating a SELECT..FOR UPDATE to LOCK and SELECT statement

2002-10-23 Thread Ludwig Lim
Hi: Is there a way to emulate a SELECT..FOR UPDATE to series of LOCK/SELECT statement. I tried the following statements using 2 psql terminals. T1 | T2 1)BEGIN; | 2)SELECT x | BEGIN; FROM y | WHERE y=1