[mapserver-users] error accessing PostGIS 2 layer

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu May 17 13:22:13 PDT 2012


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?
>>
>>




More information about the MapServer-users mailing list