<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear list</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I encounter problem querying a postgis database 
from mapserver.</FONT></DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><EM>Content-type: text/html <!-- MapServer version 3.6.6 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->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 ''.<BR>Standard ways of specifiying are : <BR>(1) 
'geometry_column from geometry_table' <BR>(2) 'geometry_column from (<sub 
query>) as foo using unique <column name> using SRID=<srid#>' 
<BR><BR>Make sure you put in the 'using unique <column name>' and 'using 
SRID=#' clauses in. <BR><BR>For more help, please see 
http://postgis.refractions.net/documentation.php <BR><BR>Mappostgis.c - version 
of Nov 15/2002. </EM></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>When I check to Postgresql Log file it 
displays:</FONT></DIV>
<DIV><BR><FONT face=Arial size=2><EM>LOG:  pq_recvbuf: unexpected EOF on 
client connection</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM></EM></FONT> </DIV>
<DIV><FONT face=Arial size=2>The sql string I use is :</FONT></DIV>
<DIV><FONT face=Arial size=2>DATA "the_geom from (select * from mesure) as foo 
using unique gid using SRID=-1"</FONT></DIV>
<DIV><FONT face=Arial size=2>It seems to work for displaying points but not for 
querying...</DIV></FONT>
<DIV><FONT face=Arial size=2>I am using Mapserver 3.6.6, php 4.3.2, pgsql 7.3.3 
and Postgis 0.7.5</FONT></DIV>
<DIV><FONT face=Arial size=2>Any help or comments welcome,</FONT></DIV>
<DIV><FONT face=Arial size=2>Christian</FONT></DIV></BODY></HTML>