#10467: Remove use of "RETURNING" in PostgreSQL backends by default
---------------------------------------------------+------------------------
Reporter: mtredinnick | Owner: mtredinnick
Status: new | Milestone: 1.1 beta
Component: Database layer (models, ORM) | Version: 1.0
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by ikelly):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Maybe this should be a separate ticket, but it's close enough that I'll be
lazy and just add it to this one. The existing "RETURNING" support
doesn't seem to be complete, since the "SELECT CURRVAL" query is still
happening:
{{{
In [1]: from django.db import connection
In [2]: from testapp.models import P
In [3]: p = P()
In [4]: p.id
In [5]: p.save()
In [6]: p.id
Out[6]: 1L
In [7]: connection.queries
Out[7]:
[{'sql': 'INSERT INTO "testapp_p" ("id") VALUES (DEFAULT) RETURNING
"testapp_p"."id"',
'time': '0.004'},
{'sql': 'SELECT CURRVAL(\'"testapp_p_id_seq"\')', 'time': '0.001'}]
}}}
It looks like one of the diffs for subqueries.py from the patch in #3460
didn't make it into the final commit.
--
Ticket URL: <http://code.djangoproject.com/ticket/10467#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---