[postgis-users] postgis version consistency issue

olivier.lobry at umontpellier.fr olivier.lobry at umontpellier.fr
Fri Nov 22 01:52:54 PST 2019


Hi

It looks like I have installation issues with postgis. 
I recently upgrade from pg 9.3 / postgis 2.2.x to pg 11 / postgis 2.5.2
But I now have some issues with some Postgis functions. For instance :
 SELECT
    st_collect(t.geom) AS geom
   FROM
    a_table t

rises :
ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory
SQL state: 58P01


It seems it looks for version 2.4, while 2.5.2 is installed :

$ dpkg -l | grep postgis
ii  postgis                              2.5.2+dfsg-1~exp1.pgdg90+1          amd64        Geographic objects support for PostgreSQL
ii  postgis-doc                          2.5.2+dfsg-1~exp1.pgdg90+1          all          Geographic objects support for PostgreSQL -- documentation
ii  postgresql-11-postgis-2.5            2.5.2+dfsg-1~exp1.pgdg90+1          amd64        Geographic objects support for PostgreSQL 11
ii  postgresql-11-postgis-2.5-scripts    2.5.2+dfsg-1~exp1.pgdg90+1          all          Geographic objects support for PostgreSQL 11 -- SQL scripts


$ psql -d OSU -c "SELECT PostGIS_full_version();"
                                                                             postgis_full_version                                                                             
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="2.5.2 r17328" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1" TOPOLOGY RASTER


And what is strange is that \dx gives version 2.1.3… 
whereas postgis_topology is ok
why ??

$ psql -d OSU -c "\dx"
                                                List of installed extensions
       Name       | Version |   Schema   |                                    Description                                    
------------------+---------+------------+-----------------------------------------------------------------------------------
 postgis          | 2.1.3   | public     | PostGIS geometry, geography, and raster spatial types and functions
 postgis_topology | 2.5.2   | topology   | PostGIS topology spatial types and functions


If I try to upgrade I obtain this error : 
$ psql -d OSU -c "ALTER EXTENSION postgis UPDATE;"
ERROR:  function "st_union(geometry)" does not exist
LINE 2:  WHERE oid = 'st_union(geometry)'::regprocedure AND proparal...
                     ^
QUERY:  UPDATE pg_proc SET proparallel = 's'
	WHERE oid = 'st_union(geometry)'::regprocedure AND proparallel = 'u'
CONTEXT:  PL/pgSQL function inline_code_block line 5 at SQL statement



Anyone know how I can fix this version consistency issues and have a clean installation ??

Thank you for your help

Regards

Olivier



-----
Olivier Lobry
Ingénieur de Recherche
Chargé du Système d'Information
OSU OREME
UMS 3282 CNRS - UMS 223 IRD
www.oreme.org <http://www.oreme.org/> / data.oreme.org <http://data.oreme.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20191122/87dec7ef/attachment.html>


More information about the postgis-users mailing list