﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15209	Manager.raw() allow for WITH ( ... ) SELECT	Mike Fogel	nobody	"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.
"		closed	Database layer (models, ORM)	dev		duplicate	with, Manager.raw()	Mike Fogel	Accepted	1	1	1	1	0	0
