James Henstridge wrote: > The patch I did for psycopg2 should let you perform 2PC, so could be > used as above whether or not the Oracle adapter you are using supports > it.
You can also do this right now if you don't mind it being ugly: con = psycopg.connect('') [... do stuff ...] xid = 'xid%f' % random() cur = con.cursor() cur.execute('PREPARE TRANSACTION %s', [xid]) try: [... commit oracle ...] except: cur.execute('ROLLBACK PREPARED %s', [xid]) else: cur.execute('COMMIT PREPARED %s', [xid]) You might be able to do the same trick with Oracle, allowing you to handle more than 2 Oracle connections safely. -- Stuart Bishop <[EMAIL PROTECTED]> http://www.stuartbishop.net/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig