[postgis-users] postgis query error on mapserver
Aaron Steele
asteele at berkeley.edu
Sat Aug 21 15:38:32 PDT 2004
dear readers,
i'm running postgis (v0.8.2) with postgresql (v7.4.3) on red hat
enterprise linux AS (v3) using apache (v2.0.50).
i've setup a postgis layer in my mapfile. mapserver queries against
this layer give an error. i've heard about problems with mappostgis.c,
but i have a pretty recent version (1.34.2.2, 2004/06/02). following is
my mapfile DATA string along with the error:
DATA "the_geom from counties as foo using unique gid using srid=-1"
<error>
Content-type: text/html msPOSTGISLayerGetShape(): Query error. Error
executing POSTGIS SQL statement (in FETCH ALL): DECLARE mycursor2
BINARY CURSOR FOR SELECT
gid::text,AREA::text,PERIMETER::text,CNTY24K97#::text,CNTY24K97-::
text,name::text,NAME_CAP::text,NUM::text,FIPS_CODE::
text,asbinary(force_collection(force_2d(the_geom)),'NDR') from counties
as foo WHERE gid = 78 -ERROR: syntax error at or near "::" at character
108
More Help:
Error with POSTGIS data variable. You specified ''.
Standard ways of specifiying are :
(1) 'geometry_column from geometry_table'
(2) 'geometry_column from (<sub query>) as foo using unique <column
name> using
SRID=<srid#>'
Make sure you put in the 'using unique <column name>' and 'using
SRID=#' clauses in.
For more help, please see
http://postgis.refractions.net/documentation.php
Mappostgis.c - version of Jan 23/2004.
</error>
any initial thoughts?
thanks,
aaron
More information about the postgis-users
mailing list