[Qgis-developer] Postgres provider checks queries and refuses CTE

Giuseppe Sucameli brush.tyler at gmail.com
Tue Jul 10 09:07:50 PDT 2012


Hi,

On Tue, Jul 10, 2012 at 5:10 PM, Vincent Picavet
<vincent.ml at oslandia.com> wrote:
> The postgres provider apparently does a check on the input query and only
> tolerates queries beginning with "SELECT".

the so called "SELECT statement to vector layer" [1] was
implemented in PG and SL providers respectively from Qgis 1.5
and QGis 1.6. The pattern for queries is "(SELECT ... )".

> Is the filter useful anyway, since there are so many ways to write non-valid
> queries ?

I added that check to be sure the query can be used as subquery,
but it make no sense for PG as the other statements can return a
result as well.

> Those in favor of keeping it raise your hands and arguments now,
> or I think we'd better drop it...

+1 to drop it.

I'm not sure the same has to be done for SL provider, although
it's better to make them uniform.

Regards.

[1] http://www.carsonfarmer.com/?p=713

-- 
Giuseppe Sucameli


More information about the Qgis-developer mailing list