#15209: Manager.raw() allow for WITH ( ... ) SELECT
------------------------------------------+---------------------------------
 Reporter:  carbonXT                      |          Owner:  nobody    
   Status:  new                           |      Milestone:  1.4       
Component:  Database layer (models, ORM)  |        Version:  SVN       
 Keywords:  with, Manager.raw()           |   Triage Stage:  Unreviewed
Has patch:  1                             |  
------------------------------------------+---------------------------------
 The !RawQuery object used by Manager.raw() validates input SQL to ensure
 that only SELECT queries can be ran through it.  This is done such that
 SELECT queries with using a WITH (...) clause fail validation.

 I propose changing the validation of the SQL such that SELECTs with these
 WITH clauses are ok.

 The attached patch does that.  It also does not weaken the validation as
 preceding WITH clauses can only be used with SELECT statements. Re:

  * Postgres: http://www.postgresql.org/docs/9.0/static/sql-select.html
  * Oracle: http://www.oracle-base.com/articles/misc/WithClause.php
  * Other backends don't support the WITH clause.

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