#12180: ProgrammingError thrown with autocommit: True if first query on
PostgreSQL
>= 8.2 is an INSERT
-------------------------------------+-------------------------------------
Reporter: Xof | Owner: Xof
Type: Bug | Status: closed
Component: Database layer | Version: 1.3
(models, ORM) | Resolution: fixed
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by tobias):
* ui_ux: => 0
Comment:
Note that, for anyone needing this fix on Django 1.3, it appears to be
possible to implement the required functionality from this patch by adding
the following to your urls.py (with a hefty comment explaining why, of
course):
{{{
from django.db.backends.postgresql_psycopg2.base import DatabaseFeatures
DatabaseFeatures.can_return_id_from_insert = True
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12180#comment:18>
Django <https://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.