[postgis-users] Problem with subselects
Jan Hartmann
jhart at frw.uva.nl
Thu Oct 24 05:16:42 PDT 2002
Sorry, used the old mappostgis.c. The new one has exactly the same
problem (no map in the second case), but the SQL is slightly different:
1)
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
(select c.the_geom,c.oid,pop.y2000 from continents as c,population as
pop where pop.id = cc.id) as foo WHERE the_geom && setSRID('BOX3D(-180
-180,180 180)'::BOX3D, find_srid('','continents','the_geom') )'
2)
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
(select c.the_geom,c.oid,pop.y2000 from population as pop,continents as
c where pop.id = cc.id) as foo WHERE the_geom && setSRID('BOX3D(-180
-180,180 180)'::BOX3D, find_srid('','population','the_geom') )'
3)
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from
(select c.the_geom,c.oid,pop.y2000 from population as pop,continents as
c where pop.id = cc.id) as foo WHERE the_geom && setSRID('BOX3D(-180
-180,180 180)'::BOX3D, 4326 )'
I forced an error by saying "where pop.id = cc.id". When using "where
pop.id = c.id" 1) and 3) return a map, 2) a blank image.
Jan
More information about the postgis-users
mailing list