#9049: queryset .extra(tables=[...]) unnecessarily quotes table names
---------------------------------------------------+------------------------
          Reporter:  tobias                        |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.0   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This patch isn't going in, it will cause too many difficult-to-diagnose
 bugs in people's code to support something that only worked by accident.

 There's a case for adding a literal-pass-through class to a few places in
 the query code that can be used to avoid any quoting or further processing
 and I've played around with that a bit in code with clients already. It
 mostly works (right now, the way to get what you want is to subclass Query
 and override the `get_from_clause` method). I'm also thinking about how to
 add general support for nested subqueries in the FROM-clause portion of
 the query which will help here. With a good tail-wind, that's likely to be
 ready for 1.1.

 Django's ORM isn't meant to be a total replacement for SQL and this is one
 of those places where you probably can't just use the normal function
 calls right now. Subclassing and overriding the appropriate methods still
 works, however.

 I'll leave this open as the reference point for adding subqueries and
 literals to "FROM".

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

Reply via email to