On Sunday, September 22, 2013 8:38:10 PM UTC+2, Shai Berger wrote: > > I would take Anssi's suggestion another step forward -- or backward, > depends > where you're looking from :-) -- stop marking transactions for rollback. > Make > save() and associates use savepoints, only on PostgreSQL, so that, > everywhere, > one may recover from database errors within the transaction. >
I am not really in favor of that for a simple reason: I like to use third party apps and I'd like them to work with every database; in this case the strictest one is postgres, so that's the API Django should choose. I also don't think it's a good idea to just try/except statements and then continue if the database allows it; since database errors raised by Django (that is, those suggested by the dbapi) are not granular enough to be useful. This has bitten me and is still causing headaches in django-taggit, since a raised IntegrityError doesn't neccessarily affect the field you thought it would (ideas welcome)… All in all, whenever I see people catching database errors and continue afterwards it almost always has the tendency to blow up in some odd ways. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.