[postgis-users] itemnquery limitation

Tom Melhuish tmelhuish at webinsightsinc.com
Wed Aug 6 09:34:39 PDT 2003


I’m performing an itemnquery and if I have 21 items in the list mapserv
works fine. If I have 22 in the list mapserv hangs and I end up with a
“premature end of script header” with no other error messages. Below is the
declare statement out of mapserv with 22 items listed, that doesn’t work and
21 items that does work. I have about 50 nodeid and switched nodeid around
to confirm that I didn’t have a bad one in the list. A set of 21 works fine
and 22 or more hangs running mapserv. If I run this DECLARE statement in
postgresql it excecute "OK". If I run just the SELECT statement out of this
is runs fine and gives me the results I expect.

Is their a limit in the C code that I can change to get around this in
mapserv?

22 Items - fails
-----------

DECLARE mycursor BINARY CURSOR FOR SELECT
nodeid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
from nodescomb_2003 WHERE (nodeid in
('413.0','430.0','431.0','432.0','433.0','434.0','436.1','450.0','451.0','45
2.0',
'453.0','454.0','455.0','456.0','457.1','457.2','457.3','457.4','458.1','458
.2','459.0','528.0')) and (the_geom && setSRID( 'BOX3D(2001272.875
643833.625,2099924.5
696954.5)'::BOX3D,find_srid('','nodescomb_2003','the_geom') ))

21 Items – works fine
-----------

DECLARE mycursor BINARY CURSOR FOR SELECT
nodeid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
from nodescomb_2003 WHERE (nodeid in
('413.0','430.0','431.0','432.0','433.0','434.0','436.1','450.0','451.0','45
2.0',
'453.0','454.0','455.0','456.0','457.1','457.2','457.3','457.4','458.1','458
.2','459.0')) and (the_geom && setSRID( 'BOX3D(2001272.875
643833.625,2099924.5
696954.5)'::BOX3D,find_srid('','nodescomb_2003','the_geom') ))

I’m running Mapserver 3.6.6, Postgres 7.3.2 & Postgis 0.7.4.

-----------
I really have the database set up to execute the following command that will
extract all of the nodeid (about 50) that are associated to a Base type.
After many days trying to troubleshoot the problem I rewrote the code to run
on individual items (nodeid). When I run this command I get the same results
as the delare statement with 22 or more items.

DECLARE mycursor BINARY CURSOR FOR SELECT
nodeid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text
from nodescomb_2003 WHERE (Base10='428') and (the_geom && setSRID(
'BOX3D(2001272.875 643833.625,2099924.5
696954.5)'::BOX3D,find_srid('','nodescomb_2003','the_geom') ))

Please let me know if you need more information to debug mu problem.

Tom Melhuish




More information about the postgis-users mailing list