| От | Tom Lane |
|---|---|
| Тема | Re: lock row in table |
| Дата | |
| Msg-id | 10885.1062077913@sss.pgh.pa.us обсуждение |
| Ответ на | lock row in table (Daniel Michał <danielosch@o2.pl>) |
| Список | pgsql-sql |
Daniel Michał <danielosch@o2.pl> writes:
> I have to lock one row in table1 for user1. In the same time other users sh=
> ould be able to read this record but when other user for example user2 want=
> to edit this record user2 should get information "The row you try to edit=
> is currently edit" - or sometihing similar.
> Of course I can lock record with syntax "Begin; select * from table1 where =
> ID=3D12 for update; update table1 set field1=3D"New value" where ID=3D12; c=
> ommit;"
> but I can not to inform other user that the record is edited?
Try using the contrib/userlock/ functions.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера