Re: Help with inventory control
От | Martijn van Oosterhout |
---|---|
Тема | Re: Help with inventory control |
Дата | |
Msg-id | 20050930154143.GA29738@svana.org обсуждение исходный текст |
Ответ на | Help with inventory control (Fernando Grijalba <fgrijalba@gmail.com>) |
Ответы |
Re: Help with inventory control
|
Список | pgsql-general |
On Fri, Sep 30, 2005 at 10:21:14AM -0400, Fernando Grijalba wrote: > I need the following to work with PostgreSQL. I was thinking of reading > uncommitted transactions, but just found out they do not work on PG. I need > to have user 1 take an item form inventory for an order and before user 1 > finishes the transaction user 2 will query the inventory. I need user 2 to > see the quantity on-hand reduced by the amount user 1 took. Why not just commit user 1's transaction then user 2 can see it. Transactions should only be open for fractions of seconds in the situation you're describing. You're not rewriting the whole database here. > Because read uncommitted is not supported is there a way to do this? Read Uncommitted goes against the very nature of a database... -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Вложения
В списке pgsql-general по дате отправления: