On Sunday 22 September 2013 12:59:02 Florian Apolloner wrote:
> 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.

The proposal will make things work consistently across backends -- PostgreSQL 
included (that's the point of "use savepoints only on PostgreSQL")...

> 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.

... but other arguments against it stand.

It is probably not a very good idea.

Shai.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to