Matt Boersma wrote:
> I think Malcolm implemented this in the Oracle backend rather than Ian
> K. or myself.
It was Ian Kelly, I think in [10022].
> So I'd say the answer is a).
If that's right, then we have an inefficiency on Oracle at present -
the uses_savepoints flag is used both to signal that savepoints are
implemented (see BaseDatabaseWrapper._savepoint*() in django/db/
backends/__init__.py), and to signal that they are needed to wrap code
which may throw IntegrityErrors (as per reason b; see
QuerySet.get_or_create() in django/db/models/query.py).
We should probably be splitting these two meanings, so Postgresql
would have:
can_savepoint = True
needs_savepoint_after_exception = True
Whereas Oracle would have:
can_savepoint = True
needs_savepoint_after_exception = False
I'll open a ticket to remember this once Ian, Malcolm or another also
confirms.
Cheers,
Richard.