Error on Itemnquery with PostGIS-layer

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Tue Aug 21 06:04:05 EDT 2007


Please post the layer configuration for postgis AND check the case of
the column name.
Postgres handles column names with case sensitivity if, at table
creation, the column name was in quotes. In that case you have the
specify the column name with exactly the same case and in quotes; this
is most likely the reason.

HTH,
Umberto

On 8/21/07, HarryS <mapcollect at gmx.net> wrote:
> doing this query:
>
> http://myServer.com/cgi-bin/mapserv?&map=/home/harry/Mapfiles/MyMap.map&mode=itemnquery&qlayer=City-Database&qitem=NAME&qstring='London'
>
> produces this Error:
>
> prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual
> query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
> NAME::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
> from name WHERE (London) and (the_geom && setSRID( 'BOX3D(-180 -90,180
> 90)'::BOX3D,find_srid('','name','the_geom') ))'
>
> Postgresql reports the error as 'FEHLER: Spalte »london« existiert nicht '
> (Translation: ERROR: Column »london« does not exist)
>
> More Help:
>
> Error with POSTGIS data variable. You specified '<check your .map file>'.
> 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/
>
> Mappostgis.c - version of Jan 23/2004.
>
>
> If I do the same query on the same layer but using a shapefile instead of
> PostGIS for identical data the query works fine without any errors. Can
> someone point me to my mistake, please ?
>
> Harry Schmidt
>
>
> --
> View this message in context: http://www.nabble.com/Error-on-Itemnquery-with-PostGIS-layer-tf4303941.html#a12250916
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>



More information about the mapserver-users mailing list