[mapserver-users] WFS fails is PostGIS table has capital characters in the name
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Thu Dec 15 04:51:59 PST 2011
Hi,
Well, this works really:
DATA 'the_geom from "mml_AVI1_l" using unique gid using srid=3067'
There must by outer single quetes and inner double ones. But this has a funny side effect. GetFeatures are working now both with &typeName=mml_AVI1_l and &typeName=mml_avi1_l. Usually in OWS services the values in the key/value pairs are case sensitive.
Single quotes inside double ones do not work because they are directly included in the SQL . The following definition
DATA "the_geom from 'mml_AVI1_l' using unique gid using srid=3067"
leads to SQL query containing
SELECT ... from 'mml_AVI1_l' ...
Double quote naturally breaks the DATA line,
I have renamed my tables to use only undercase but direct import of shapefiles can easily create mixed case table names.
A related question, does WFS schema officially accept uppercase letters in typeNames? It is different thing than the real names of database tables but I am mostly using the the table names also as typeNames. The WFS clients which I am using have not complained about mixed case names. TinyOWS accepts those too.
-Jukka Rahkonen-
________________________________________
Smith, Michael wrote:
> Jukka,
> Does it work if you quote the name? In Oracle, if you have mixed case
> table names, then those table names have to be quoted.
> Mike
--
Michael Smith
US Army Corps
Remote Sensing GIS/Center
On 12/15/11 12:29 AM, "Rahkonen Jukka" <Jukka.Rahkonen at mmmtike.fi> wrote:
>Hi,
>
>It seems that Mapserver WFS fails if the PostGIS source table has
>capitalised characters in the name. For example with table named
>Natura2000_Suomi_2010 the DescibeFeatureType fails and error suggests
>that Mapserver is usin table name
>"natura2000_suomi_2010" in the query instead.
>
>[Thu Dec 15 07:22:38 2011].109270 msPostGISLayerGetItems(): Query error.
>Error (ERROR: relation "natura2000_suomi_2010" does not exist
>LINE 1: select * from Natura2000_Suomi_2010 where false limit 0
>
>My Mapserver version is 6.0.1 on Ubuntu Linux.
>
>-Jukka Rahkonen-
>_______________________________________________
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list