[Mapserver-users] postgis and drawquery failing

Daniel Morissette dmorissette at dmsolutions.ca
Wed May 12 17:10:11 EDT 2004


AARON KONING wrote:
> Hello again list,
> 
> So my problem has to do with postgis datasets again. If I do a $map->drawQuery() when more than one feature has been found I always get a postgis error:
> 
> Warning:  [MapServer Error]: msPOSTGISLayerGetShape(): Error executing POSTGIS  SQL   statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(the_geom)),'NDR') from public.ipln_bc AS foo WHERE oid = 23234
> -ERROR:  cursor "mycursor" already exists
> 
> If only one feature is found, then no problem it shows up in yellow (my highlight color) every time.
> 
> I've added oid and gist indexing, done VACUUM ANALYZE, done SELECT UPDATE_GEOMETRY_STATS() and no change has occurred.
> 
> mapserver version: 4.0.1
> postgis version: 0.8.0
> postgresql version: 7.4
> 
> Any suggestions or should I file a bug report?
> 

I'd suggest that you try version 4.0.2, it contains the following change:

---
- Copied 4.1 mappostgis.c back with changes for pg7.4 support, error
   reporting, etc.
---

If that still fails with 4.0.2 then please try against 4.2, and if it 
fails there then please report a bug.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-users mailing list