[Zope-DB] Trying to catching ZPsycopg exceptions aborts the
dieter at handshake.de
Mon Nov 29 15:56:45 EST 2004
Josef Meile wrote at 2004-11-29 12:08 +0100:
>I know it may sound strange, but I don't want the DA to abort the
>transaction when trying to insert a duplicate record.
>I am implementing a reservation system for diferent kinds of resources:
It was my impression that transaction safety is especially
essential for reservation systems.
I suggest you implement your logic directly (i.e. by queries) and not via
database generated exceptions (consistency violations).
As your system is inherently concurrent, the direct implementation
will be able to reduce the likelyhood of conflicts but
cannot garantee to exclude them alltogether.
For the remaining conflicts, I would use the standard transaction
behaviour: abort (and maybe retry automatically).
More information about the Zope-DB