[postgis-users] subselect on DATA tag

John Hagstrand john.hagstrand at interageresearch.com
Sun Jul 13 12:50:19 PDT 2003


Hi,

I'm using a subselect on the DATA statement in my mapserv mapfile, and it
gives me an error.  It works fine without the subselect.  Can anyone explain
this error to me?

Here is the DATA statement (with the subselect clause simplified for
debugging):
DATA "geo from (select id, geo, dtime from tstory) as foo using srid=4326
using unique id"

Here is the call to mapserv:
http://www.globalscoop.com/cgi-bin/mapserv?mode=map&map=/home/virtual/global
scoop.com/var/www/html/gs/map/gs.map&layers=countries+lakes+rivers+stories&m
ap_size=553+277&mapEXT=-180+-90+180+90&map_stories_filter=dtime+between+2003
.187+and+2003.194

And here is the error:
msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing POSTGIS
DECLARE statement (0.6 failed - retried 0.5 and it failed too). DECLARE
mycursor BINARY CURSOR FOR SELECT
dtime::text,asbinary(force_collection(force_2d(geo)),'NDR'),id::text from
(select id, geo, dtime from tstory) as foo using srid=4326 WHERE (dtime
between 2003.187 and 2003.194) and (geo && setSRID( 'BOX3D(-180 -90,180
90)'::BOX3D,find_srid('','tstory','geo') ))

Thanks very much.
John

John Hagstrand
Interage Research, Inc.
18733 State Line Road
Antioch, IL  60002
847 838 5371





More information about the postgis-users mailing list