Opened 20 years ago
Closed 18 years ago
#667 closed defect (fixed)
queryByFeatures fails for postgis if more than one polygon feature is selected
Reported by: | Owned by: | refractions | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | PostGIS Interface | Version: | 4.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi again, I believe I have found a bug with the PHP mapscript function queryByFeatures which relates to the following quote by paul ramsey regarding querybyrectangle in the past: "It is a change in cursor behavior in PostgreSQL 7.4. (They must now be explicitly closed at the end of a transaction.)" Querybyrectangle works great all the time now. Querybyfeatures works great except if there is more than one polygon selected in the slayer. Then it always seg faults with the 'cursor already exists' type of message: Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT FCODE::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text from public.ipln_bc AS foo WHERE the_geom && setSRID('BOX3D(956404.262053808 764544.165838641,1029080.68224934 911775.571900677)'::BOX3D, 42102 )' <br><br> Postgresql reports the error as 'ERROR: cursor "mycursor" already exists ' postgresql: 7.4 postgis: 0.8.0 mapserver: 4.0.2 php: 4.3.4 Thanks, Aaron
Note:
See TracTickets
for help on using tickets.