Обсуждение: test subscribed

Поиск
Список
Период
Сортировка

test subscribed

От
Karin Probost
Дата:
test please ignore

Lock vs Update

От
Chairudin Sentosa Harjo
Дата:
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