Bug report #6142
problem with 'WITH' query in DB Manager to create new layer from query (using PostGIS DB)
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Giuseppe Sucameli | ||
Category: | Data Provider | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 15470 |
Description
When using DB Manager, and the SQL Windows,
When using a 'WITH' in a SQL query the result rows are properly shown and everything is fine.
But when trying to use this result to create a new layer it silently doesn't work.
I tried an equivalent SQL query without 'WITH' and it worked. I of course tried the 'WITH' query in PgAdmin it works well.
Associated revisions
History
#1 Updated by Giuseppe Sucameli over 12 years ago
- OS version deleted (
32 Vista) - Operating System deleted (
Windows) - Target version deleted (
Version 1.8.0) - Category changed from DB Manager to Data Provider
That behavior depends on the provider, there's a check that allows SELECT
queries only.
Removing that check was discussed few weeks ago on the developer ML, see http://osgeo-org.1560.n6.nabble.com/Postgres-provider-checks-queries-and-refuses-CTE-td4987347.html
#2 Updated by Jürgen Fischer over 12 years ago
- Status changed from Open to Closed
Fixed in changeset 5988a9c9dc5898ea2fe7463e65e854189e07b16f.