Lock vs Update

Поиск
Список
Период
Сортировка
От Chairudin Sentosa Harjo
Тема Lock vs Update
Дата
Msg-id 35D3EE21.E24F5F49@dnet.net.id
обсуждение исходный текст
Ответ на test subscribed  (Karin Probost <probost@uni-wuppertal.de>)
Список pgsql-sql
Hi all,

I have a question regarding lock.
I want to update a table, so I want to make sure nobody else
is trying to update the same table, that's why I use lock.

What is the meaning of the NOTICE when I update the "mytable" ?

#########################################
mytable=> begin;
BEGIN

mytable=>lock table mytable;
DELETE 0

update mytable set status='INVALID' where number=12;
NOTICE: (transaction aborted): queries ignored until END
*ABORT STATE*
#########################################


I can only update the "mytable" after I type:

#########################################
mytable=> end;
END

mytable=> update mytable set status='INVALID' where number=12;
UPDATE 1
##########################################


Regards
Chai





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

Предыдущее
От: Karin Probost
Дата:
Сообщение: test subscribed
Следующее
От: postgres@koma.net
Дата:
Сообщение: ...