[postgis-users] Fw: Mapserver Query problems

Christian Blumer christian.blumer at epfl.ch
Wed Jun 18 01:12:23 PDT 2003

Dear list

I encounter problem querying a postgis database from mapserver.
I have point data in a postgis layer which are well displayer. Only when I try to query objects, I got the following error message from mapserver:

Content-type: text/html msPOSTGISLayerGetShape(): Query error. Error executing POSTGIS SQL statement (in FETCH ALL): EXPLAIN VERBOSE SELECT * FROM (select * from mesure) as foo - Error with POSTGIS data variable. You specified ''.
Standard ways of specifiying are : 
(1) 'geometry_column from geometry_table' 
(2) 'geometry_column from (<sub query>) as foo using unique <column name> using SRID=<srid#>' 

Make sure you put in the 'using unique <column name>' and 'using SRID=#' clauses in. 

For more help, please see http://postgis.refractions.net/documentation.php 

Mappostgis.c - version of Nov 15/2002. 

When I check to Postgresql Log file it displays:

LOG:  pq_recvbuf: unexpected EOF on client connection

The sql string I use is :
DATA "the_geom from (select * from mesure) as foo using unique gid using SRID=-1"
It seems to work for displaying points but not for querying...
I am using Mapserver 3.6.6, php 4.3.2, pgsql 7.3.3 and Postgis 0.7.5
Any help or comments welcome,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20030618/a19313cd/attachment.html>

More information about the postgis-users mailing list