[Zope] Concurrency/Atomicity in ZSQL/ZOracleDA ?
Renaud Guérin
rguerin@free.fr
Thu, 21 Mar 2002 17:22:47 +0100 (MET)
> >I think I need to lock the table against reads, not inserts.
> >What I must ensure is that no more select's max(id)+1 can be done
> before the
> >subsequent insert is completed.
> >I don't know how to use LOCK to do that, anyone ?
> You want LOCK TABLE table IN EXCLUSIVE MODE; most likely. A second
> lock statement will block until the first one clears.
damn, just read this:
"A lock never prevents other users from querying the table. A query never places
a lock on a table. Readers never block writers and writers never block readers. "
(http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/statements_915a.htm)
So I guess that leaves me for good with only the sequence option, unless there's
something we didn't think of...
thanks anyway!