Hi Fernando,

I would try using the shp2img utility at the commandline, and set CONFIG "CPL_DEBUG" "ON" in your mapfile (see https://mapserver.org/optimization/debugging.html#step-3-turn-on-cpl-debug-optional) and then execute:

  shp2img -m mymap.map -o ttt.png -all_debug 5

The full query should be listed there in the response, which you can then paste into the psql commandline, and manually execute the same query to your database.

PS. hello to my friends in Brasil!

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/


On 2020-06-25 5:16 p.m., Fernando Martins Pimenta wrote:
Hi,

I am using the query below to return a hydrograph of a region (using POSTGIS). This query works perfectly when I use it in pgadmin. With the mapserver, the connection with the client is lost. It records a query that shows no errors in SQL, just shows that the connection has lost. Why is that?

DATA "geom FROM (
          SELECT
            hidro.fid, hidro.name <http://hidro.name>, ST_Intersection(gcc.geom, hidro.geom) AS geom
           FROM
             vector.hidrography AS hidro,
             vector.gcc AS gcc
          WHERE ST_Intersects(gcc.geom, hidro.geom) AND gcc.name <http://gcc.name> = 'GRANDE'
) as subquery USING UNIQUE fid USING SRID=4326"

Thanks in advance

*Fernando Martins Pimenta <http://lattes.cnpq.br/0646984654461300>*
Graduando em Engenharia de Agrimensura e Cartográfica - UFV
Bacharel em Engenharia de Biossistemas - UFSJ

www.biosfera.dea.ufv.br <http://www.biosfera.dea.ufv.br>



_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to