<!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.1522" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a problem with Mapserver4.8
beta.</FONT></DIV>
<DIV><FONT face=Arial size=2>It generates a query to postgres that has a syntax
error. The query is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>SELECT
type::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from
(SELECT the_geom,gid,type,name from places WHERE site_id = 1037 and layer =
'lyr_1158') as foo USING UNIQUE gid WHERE the_geom &&
setSRID('BOX3D(1395438.0354687 4996928.553392,1397377.5000833
4998384.533238)'::BOX3D, -1 );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and the postgres (8.1) error:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ERROR: syntax error at or near "USING" at
character 182<BR>LINE 1: ...ERE site_id = 1037 and layer = 'lyr_1158') as foo
USING UNIQ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The original query is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>the_geom from (SELECT the_geom,gid,type,name from places WHERE site_id =
1037 and layer = 'lyr_1158') as foo USING UNIQUE gid USING srid=-1<BR></DIV>
<DIV><FONT face=Arial size=2>The previous versions of mapserver work
perfectly.</FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PS. Yesterday I posted the same question with some
difference. Please ignore this and answer only to this message.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks. Any help appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2>Stefano.</FONT></DIV></BODY></HTML>