<div dir="ltr">Hi list,<div><br></div><div>I've been struggling with DB Manager, and I hope someone can explain me what the problem is.</div><div><br></div><div>I am querying a PostGIS table but when I try to load the SELECT results to map canvas nothing happens! A simple example:</div>
<div><br></div><div>SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'</div><div><br></div><div>returns thos message in log winfow:</div><div><br></div><div><div><i>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%'</i></div>
<div><i>) AS "subQuery_0" returned 7 [ERROR: function geometrytype(double precision) does not exist</i></div><div><i>LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...</i></div><div>
<i> ^</i></div><div><i>HINT: No function matches the given name and argument types. You might need to add explicit type casts.</i></div><div><i>]</i></div><div><br></div><div>Now the strange think is that if use this query as a CREATE VIEW, the view can be added to map canvas! Any hints?</div>
<div><br></div><div>Thanks in advance,</div><div><br></div><div>André</div><div><br></div>-- <br><div dir="ltr">---------------------------------------------------------------<br><img src="https://1.bp.blogspot.com/-tUOfxWaFyQ8/UKN4jZdmLlI/AAAAAAAAA50/mMZ01ZDGCkI/s280/Logotipo-SHN-novo-02.gif" width="200" height="102"><br>
<br><span><font color="#999999"><b>Sociedade de História Natural</b><br><font>Departamento de Informa</font></font></span><span><font color="#999999"><font><span>ção Geográfica<br></span>Polígono Industrial do Alto do Amial<br>
Pav.H02 e H06</font><br><br><a href="mailto:laboratorio@alt-shn.org" target="_blank">i.geografica<font color="#999999">@</font>alt-shn.org</a><br><a href="http://www.shn.pt" target="_blank">www.shn.pt</a><br><a href="http://www.alt-shn.blogspot.com" target="_blank">www.alt-shn.blogspot.com</a></font></span><div>
<span><font color="#999999"><a href="https://www.facebook.com/SociedadeDeHistoriaNatural?ref=hl" target="_blank">Facebook</a><br><br>TLM: <a value="+351964138188">964138188</a></font></span></div><br></div>
</div></div>