[Geoserver-devel] [jira] (GEOS-5473) WFS-T Compatibility with Postgis 2.0

Jérôme Bastion created BugGEOS-5473
WFS-T Compatibility with Postgis 2.0

Issue Type:

BugBug

Affects Versions:

2.1.4

Assignee:

Andrea Aime

Attachments:

stacktrace.log

Components:

PostGIS, WFS

Created:

22/Nov/12 10:37 AM

Description:

When I saved a feature in a WFS Layer,
Geoserver uses the postgis function ‘geomfromtext’ instead of ‘ST_geomfromtext’. But ‘geomfromtext’ doesn’t exist in Postgis 2.0.

It works after creating these functions in postgres

> CREATE OR REPLACE FUNCTION geomfromtext(_texte text)
> RETURNS geometry AS
> $BODY$
> BEGIN
> RETURN st_geomfromtext(_texte);
> END;
> $BODY$
> LANGUAGE plpgsql VOLATILE
> COST 1;
>
> CREATE OR REPLACE FUNCTION geomfromtext(_texte text, _srid integer)
> RETURNS geometry AS
> $BODY$
> BEGIN
> RETURN st_geomfromtext(_texte, _srid);
> END;
> $BODY$
> LANGUAGE plpgsql VOLATILE
> COST 1;

Environment:

openLayers 2.12
Geoserver 2.1.4 (war in tomcat)
PostgreSQL 9.1.6
PostGis 2.0.1

Project:

GeoServer

Labels:

wfs postgis

Priority:

MajorMajor

Reporter:

Jérôme Bastion

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)