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 по дате отправления: