[Qgis-user] Can't use Postgres WITH clause (Common Table Expressions) in DBManager in QGIS 1.8

Alexandre Neto senhor.neto at gmail.com
Wed Feb 6 05:55:25 PST 2013


Grazzie mile Giuseppe!

In fact, I can put everything inside the SELECT.

Alexandre Neto



On Wed, Feb 6, 2013 at 12:54 PM, Giuseppe Sucameli <brush.tyler at gmail.com>wrote:

> Hi Alexandre,
>
> On Wed, Feb 6, 2013 at 1:42 PM, Alexandre Neto <senhor.neto at gmail.com>
> wrote:
> > In DBManager SQLWindow [...]
> > when I try to load it QGIS Canvas (selecting the Id and geometry
> columns), I
> > got the following error in the postgis warning tab:
> >
> > Erroneous query: SELECT * FROM "(WITH query_1 as (
>
> unfortunately the provider doesn't support to load that statement,
> it allows SELECT only.
>
> Anyway, until it is fixed, you could embed your WITH within a SELECT
> statement.
>
> Regards.
>
> > SELECT *
> > FROM ""PDM"".pdm_compare)
> > SELECT *
> > FROM query_1
> > )" LIMIT 1 returned 7 [ERROR:  relation "(WITH query_1 as (
> > SELECT *
> > FROM "PDM".pdm_compare)
> > SELECT *
> > " does not exist
> > LINE 1: SELECT * FROM "(WITH query_1 as (
> >                       ^
> > ]
> >
> > I tried using qgis 1.9 and I was able to load the query. Is this a known
> > problem in 1.8? Is there a workaround so I can use WITH statements in
> QGIS
> > 1.8.
> >
> > Thanks,
> >
> > Alexandre Neto
> >
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
>
>
>
> --
> Giuseppe Sucameli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130206/6506d910/attachment.html>


More information about the Qgis-user mailing list