#10476: Fix(?) model insert handling when autcommit=True for PostgreSQL <= 8.1
---------------------------------------------------+------------------------
          Reporter:  mtredinnick                   |         Owner:  mtredinnick
            Status:  new                           |     Milestone:  1.1        
         Component:  Database layer (models, ORM)  |       Version:  SVN        
        Resolution:                                |      Keywords:             
             Stage:  Accepted                      |     Has_patch:  1          
        Needs_docs:  0                             |   Needs_tests:  0          
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by Richard Davies <[email protected]>):

 The last patch leaves the 'if version >= 8.2' rather awkwardly inside an
 'if uses_autocommit'.

 I don't think that outer 'if' statement is necessary, even in light of
 #10467 comment 4 and #10509, so here's a version which removes it, and
 hence allows the 'returning' syntax to be used whenever version >= 8.2,
 regardless of uses_autocommit.

 I think that [10065] was confused between two things:

 - setting 'can_return_id_from_insert=True' inside _cursor() rather than by
 default, which is necessary and the point of #10509

 - only doing this if uses_autocommit, which was overcautious and
 unnecessary

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10476#comment:6>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to