Hello Geoserver developers,
When modifying a feature element (text field) with a single quote in it, the following error is logged:
08-Nov-2007 09:05:11 org.geotools.data.postgis.PostgisFeatureStore modifyFeatures
WARNING: Some sort of database connection error: ERROR: syntax error at or near "t"
The WFS-T request is:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0">
<wfs:Update typeName="west:features">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:FeatureId fid="features.588" />
</ogc:Filter>
<wfs:Property>
<wfs:Name>west:name</wfs:Name>
<wfs:Value>test</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>west:geoLocation</wfs:Name>
<wfs:Value>
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="http://www.opengis.net/gml/srs/epsg\.xml\#4326">
<gml:coordinates decimal="." cs="," ts="">1.5,55.2625</gml:coordinates>
</gml:Point>
</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>west:text</wfs:Name>
<wfs:Value>don't panic</wfs:Value>
</wfs:Property>
</wfs:Update>
</wfs:Transaction>
The response is:
<wfs:WFS_TransactionResponse version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd"> <wfs:TransactionResult> <wfs:Status> <wfs:FAILED/> </wfs:Status> <wfs:Message>Some sort of database connection error: ERROR: syntax error at or near "t"</wfs:Message> </wfs:TransactionResult></wfs:WFS_TransactionResponse>
The feature definition in PostGIS is:
Table "public.features"
Column | Type | Modifiers
------------------------------------+--------------------------+------------------------------------------------------
oid | integer | not null default nextval('features_oid_seq'::regclass)
name | character varying |
geoLocation | geometry |
text | character varying |
Indexes:
"features_pkey" PRIMARY KEY, btree (oid)
Check constraints:
"enforce_dims_geoLocation" CHECK (ndims("geoLocation") = 2)
"enforce_geotype_geoLocation" CHECK (geometrytype("geoLocation") = 'POINT'::text OR "geoLocation" IS NULL)
"enforce_srid_geoLocation" CHECK (srid("geoLocation") = 4326)
Is this a known bug?
Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600