Mapserver 4.8beta and Postgis problem
stefano.bonnin at COMAI.TO
Thu Nov 10 04:42:04 EST 2005
I have a problem with Mapserver4.8 beta.
It generates a query to postgres that has a syntax error. The query is:
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 );
and the postgres (8.1) error:
ERROR: syntax error at or near "USING" at character 182
LINE 1: ...ERE site_id = 1037 and layer = 'lyr_1158') as foo USING UNIQ...
The original query is:
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
The previous versions of mapserver work perfectly.
I have taken a look at the mappostgis.c code where the query is generated (line 530?)
It seems that "USING UNIQUE" is not erased by the parsing phase.
Thanks. Any help appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-dev