| От | Andrew Sullivan |
|---|---|
| Тема | Re: Lock ACCESS EXCLUSIVE and Select question ! |
| Дата | |
| Msg-id | 20110228225928.GC80597@shinkuro.com обсуждение исходный текст |
| Ответ на | Re: Lock ACCESS EXCLUSIVE and Select question ! (Alan Acosta <zagato.gekko@gmail.com>) |
| Список | pgsql-general |
On Mon, Feb 28, 2011 at 05:39:07PM -0500, Alan Acosta wrote: > But i have a new problem there, i have no rows for update, i create new rows > when the seats are sold, cause rarely the database knows the capacity of the > bus, number of seats, even some bus doesn't have seat number 4 for example > :p. So i cannot SELECT FOR UPDATE no existent rows, but i still need to lock > in some way in order to check if seat number X was already sold or is free ! Someone else suggests that you need a uniqueness constraint, and I agree. But I also don't understand how you can be ensuring not to double-sell something if you don't have the list of inventory prior to its being sold. A -- Andrew Sullivan ajs@crankycanuck.ca
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера