Re: [GENERAL] update table with row locking

2004-12-29 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > I believe the locks get released when the backend process terminates. > Depending on how the client dies, there may be a significant delay before > the backend process terminates. I'd expect a client-application crash to be reported to the backend prom

Re: [GENERAL] update table with row locking

2004-12-29 Thread Michael Fuhr
On Wed, Dec 29, 2004 at 07:02:51AM -0800, Mark wrote: > In general I need to lock whole table so only one session can > perform update. I'm looking for solution that will work in both C++ > and Java. As I asked in my previous message, what problem are you trying to solve? What's the rationale b

Re: [GENERAL] update table with row locking

2004-12-29 Thread Bruno Wolff III
On Wed, Dec 29, 2004 at 07:02:51 -0800, Mark <[EMAIL PROTECTED]> wrote: > In general I need to lock whole table so only one session can > perform update. I'm looking for solution that will work in both C++ > and Java. You probably want to use LOCK. You can read the documention for that command

Re: [GENERAL] update table with row locking

2004-12-29 Thread Mark
In general I need to lock whole table so only one session can perform update. I'm looking for solution that will work in both C++ and Java. Will 'SELECT FOR UPDATE' lock whole table? As per 'LOCK' will lock released if connection get closed abnormally? ( example: hard crash on the client side, n

Re: [GENERAL] update table with row locking

2004-12-23 Thread Michael Fuhr
On Thu, Dec 23, 2004 at 11:56:26AM -0800, Mark wrote: > Is it possible to lock row(s) when updating a table, so another call > for update( from different session) will be rejected and to be on > hold until lock get released ? The UPDATE statement automatically acquires locks, but if you need more

Re: [GENERAL] update table with row locking

2004-12-23 Thread Scott Marlowe
On Thu, 2004-12-23 at 13:56, Mark wrote: > Hi, > Is it possible to lock row(s) when updating a table, so another call > for update( from different session) will be rejected and to be on > hold until lock get released ? Generally the update itself will lock the table from other updates until your t

[GENERAL] update table with row locking

2004-12-23 Thread Mark
Hi, Is it possible to lock row(s) when updating a table, so another call for update( from different session) will be rejected and to be on hold until lock get released ? Thanks, Mark. __ Do you Yahoo!? The all-new My Yahoo! - What will yours do?