[Qgis-user] DB Manager

Giuseppe Sucameli brush.tyler at gmail.com
Sun Feb 2 14:16:47 PST 2014


Hi André,
what QGIS and PostGIS versions are you running?
Regards.


On Sun, Feb 2, 2014 at 3:59 PM, ALT SHN <i.geografica at alt-shn.org> wrote:

> Hi list,
>
> I've been struggling with DB Manager, and I hope someone can explain me
> what the problem is.
>
> I am querying a PostGIS table but when I try to load the SELECT results to
> map canvas nothing happens! A simple example:
>
> SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'
>
> returns thos message in log winfow:
>
> *Erroneous query: SELECT DISTINCT CASE WHEN
> upper(geometrytype("area_ea_ha")) IN
> ('POINT','MULTIPOINT','POINTM','MULTIPOINTM') THEN 'POINT' WHEN
> upper(geometrytype("area_ea_ha")) IN
> ('LINESTRING','MULTILINESTRING','LINESTRINGM','MULTILINESTRINGM') THEN
> 'LINESTRING' WHEN upper(geometrytype("area_ea_ha")) IN
> ('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM') THEN 'POLYGON' END,
> st_srid("area_ea_ha") FROM (SELECT *, geom::geometry FROM FREGUESIAS_2013
> where freguesia ILIKE 'a%'*
> *) AS "subQuery_0" returned 7 [ERROR:  function geometrytype(double
> precision) does not exist*
> *LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...*
> *                                        ^*
> *HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.*
> *]*
>
> Now the strange think is that if use this query as a CREATE VIEW, the view
> can be added to map canvas! Any hints?
>
> Thanks in advance,
>
> André
>
> --
> ---------------------------------------------------------------
>
>
> *Sociedade de História Natural*
> Departamento de Informação Geográfica
> Polígono Industrial do Alto do Amial
> Pav.H02 e H06
>
> i.geografica at alt-shn.org <laboratorio at alt-shn.org>
> www.shn.pt
> www.alt-shn.blogspot.com
> Facebook <https://www.facebook.com/SociedadeDeHistoriaNatural?ref=hl>
>
> TLM: 964138188
>
>
> _______________________________________________
> 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/20140202/fcfe719a/attachment.html>


More information about the Qgis-user mailing list