[mapserver-users] error accessing PostGIS 2 layer
Donald Kerr
donald.kerr at dkerr.co.uk
Fri May 18 05:59:24 PDT 2012
Jeff,
I'm not sure if that will be necessary as the issue is dealt with here:
https://github.com/mapserver/mapserver/issues/4186 so it should only be a
problem for a short period of time. A quick Google search provides the
answer as it's a problem that quite a few people have come across.
Regards,
Donald
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: 17 May 2012 21:22
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] error accessing PostGIS 2 layer
Maybe you ("you" being anyone who recently hit this) can document your steps
around this upgrade in the new MapServer Wiki? :)
https://github.com/mapserver/mapserver/wiki
Thanks.
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.com/
On 12-05-17 4:58 PM, Puneet Kishor wrote:
>
> On May 17, 2012, at 2:20 PM, Donald Kerr wrote:
>
>> Run one of the ".sql" files in
>> "\PostgreSQL\9.1\share\contrib\postgis-2.0"
>> to restore legacy funtions to PostGIS 2 e.g. "legacy.sql".
>> "legacy_minimal.sql" worked for me with my set up.
>>
>
>
>
> phew! thanks! legacy_minimal.sql did it.
>
>
>
>
>
>>
>>
>>
>> -----Original Message-----
>> From: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Puneet
>> Kishor
>> Sent: 17 May 2012 20:06
>> To: mapserver
>> Subject: [mapserver-users] error accessing PostGIS 2 layer
>>
>>
>> I migrated my data to PostGIS 2, and now I am getting the following
>> error (using the same mapfile as with PostGIS 1.5.3)
>>
>> msPostGISLayerWhichShapes(): Query error. Error executing query:
>> ERROR: function
>> geomfromtext(unknown, integer) does not exist
>> LINE 1: ...e_geom FROM trees.range) a_view where the_geom &&
>> GeomFromTe...
>> ^
>> HINT: No function matches the given name and argument types. You
>> might need to
>> add explicit type casts.
>>
>> The offending query in the mapfile is
>>
>> DATA "the_geom FROM (SELECT gid, species_id, species_color, the_geom
>> FROM trees.range) a_view USING UNIQUE gid USING srid=4326"
>>
>> So, it seems the MapServer is using that line to construct its own
>> query, and that query is not compliant with PostGIS 2. Suggestions?
>>
>>
_______________________________________________
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