[Zope-DB] How to use commit/rollback etc. with Zope + ZpsycopgDA ???

Federico Di Gregorio fog@debian.org
26 Mar 2002 01:43:50 +0100


--=-La8wo5f9FY4BLUhiL5k0
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Il lun, 2002-03-25 alle 15:44, Emmanuel Courcelle ha scritto:
[snip]
> The pb is that if one of the context.zsql_some_other_method(...)  gets
> an error,
> the database is inconsistent. This could be solved using only ONE
> transaction,
> BUT the Zope zsql methods are wrapped inside a transaction, so that
> I have a transaction for EACH zsql call.=20

this looks strange. i always tought (and it always worked that way) that
zope only execute a ._finish() on the connection just before sending the
data back (i.e., just one transaction no matter how many zsql methods
you call.) what version of psycopg are you using? not 1.1pre2 i hope,
transaction management is seriously broken in the 1.1 series.=20

ciao,
federico

--=20
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
INIT.D Developer                                           fog@initd.org
                      The number of the beast: vi vi vi. -- Delexa Jones

--=-La8wo5f9FY4BLUhiL5k0
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Per informazioni si veda http://www.gnupg.org

iEYEABECAAYFAjyfxEYACgkQvcCgrgZGjevUZACfS8qkH7fA6FHAK14KzglWN/XD
zKMAoJ5mCng43eGQzv6ykgJoWDnSI322
=Y1ZV
-----END PGP SIGNATURE-----

--=-La8wo5f9FY4BLUhiL5k0--