Bug report #6142
problem with 'WITH' query in DB Manager to create new layer from query (using PostGIS DB)
|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|
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.
#1 Updated by Giuseppe Sucameli over 8 years ago
- OS version deleted (
- Operating System deleted (
- Target version deleted (
- 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