Re: check if table/object is locked

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: check if table/object is locked
Дата
Msg-id 1047224138.28251.210.camel@jester
обсуждение исходный текст
Ответ на check if table/object is locked  (Jonathan Weiss <infojowe@gmx.de>)
Список pgsql-sql
Simple answer is don't lock it like that.

Store a 'last changed' date that you update when you change the tuple.
Confirm prior to writing that the 'last change' date hasn't changed
since you pulled out the information to display to the user (yes, do the
for update lock during this much shorter time).

On Sun, 2003-03-09 at 10:14, Jonathan Weiss wrote:
> hi!
>
>
> i have a problem. i developed an application for administrating cliet and
> their sales. if i want to edit a client i load him by select for update. now if
> another person want to update him, the query waits, until the first
> connection is closed. this is unacceptable, because the whole application is doing
> nothing until the db is responding. how can i check if the client is locked
> before i want to load him?
>
> thanks,
>
>
> Jonathan Weiss
--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

В списке pgsql-sql по дате отправления:

Предыдущее
От: Jonathan Weiss
Дата:
Сообщение: check if table/object is locked
Следующее
От: Vernon Wu
Дата:
Сообщение: Special characters in SQL queries