[Zope] Concurrency/Atomicity in ZSQL/ZOracleDA ?
Colin Fox
cfox@crystalcherry.com
25 Mar 2002 09:03:49 -0800
--=-8s7X5VbAO8z63QGOpqrL
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Thu, 2002-03-21 at 08:09, Renaud Gu=E9rin wrote:
> En r=E9ponse =E0 "Matthew T. Kromer" <matt@zope.com>:
> > No, its not OK -- two threads executing at the same time will generate
> > an identical MAX(ID) + 1. Thats why you have to use an Oracle
> > Sequence.
Actually, I do believe that most (all?) databases have a low-level
field, often called a rowid, which you can use. I seem to remember that
you can get access to, and refer to, the rowid of any particular record
in a table.
That would solve the problem of not being able to create a sequence, and
it would guarantee that you never got an ID collision.
I don't remember the semantics of how to access it in Oracle, though.
Sorry.
--=20
Colin Fox cfox@crystalcherry.com
CF Consulting Inc. GPG Fingerprint:
D8F0 84E7 E7CC 5C6C 9982 F1A7 A3EB 6EA3 BC97 572F
--=-8s7X5VbAO8z63QGOpqrL
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA8n1h1o+tuo7yXVy8RApeDAJ9I9clUwloh+9UVkkg/PQI5f7Ta2gCgraED
cTEOav3+w0l1Zc+qrWZdBFM=
=BIIN
-----END PGP SIGNATURE-----
--=-8s7X5VbAO8z63QGOpqrL--