maya
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
postgis_full_version()
Description
Reports full postgis version and build configuration infos.
Parameters
Name
Type
Mode
Definition
DECLARE libver text; svnver text; projver text; geosver text; sfcgalver text; cgalver text; gdalver text; libxmlver text; dbproc text; relproc text; fullver text; rast_lib_ver text; rast_scr_ver text; topo_scr_ver text; json_lib_ver text; BEGIN SELECT postgis_lib_version() INTO libver; SELECT postgis_proj_version() INTO projver; SELECT postgis_geos_version() INTO geosver; SELECT postgis_libjson_version() INTO json_lib_ver; BEGIN SELECT postgis_gdal_version() INTO gdalver; EXCEPTION WHEN undefined_function THEN gdalver := NULL; RAISE NOTICE 'Function postgis_gdal_version() not found. Is raster support enabled and rtpostgis.sql installed?'; END; BEGIN SELECT postgis_sfcgal_version() INTO sfcgalver; EXCEPTION WHEN undefined_function THEN sfcgalver := NULL; END; SELECT postgis_libxml_version() INTO libxmlver; SELECT postgis_scripts_installed() INTO dbproc; SELECT postgis_scripts_released() INTO relproc; select postgis_svn_version() INTO svnver; BEGIN SELECT topology.postgis_topology_scripts_installed() INTO topo_scr_ver; EXCEPTION WHEN undefined_function OR invalid_schema_name THEN topo_scr_ver := NULL; RAISE NOTICE 'Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?'; WHEN insufficient_privilege THEN RAISE NOTICE 'Topology support cannot be inspected. Is current user granted USAGE on schema "topology" ?'; WHEN OTHERS THEN RAISE NOTICE 'Function postgis_topology_scripts_installed() could not be called: % (%)', SQLERRM, SQLSTATE; END; BEGIN SELECT postgis_raster_scripts_installed() INTO rast_scr_ver; EXCEPTION WHEN undefined_function THEN rast_scr_ver := NULL; RAISE NOTICE 'Function postgis_raster_scripts_installed() not found. Is raster support enabled and rtpostgis.sql installed?'; END; BEGIN SELECT postgis_raster_lib_version() INTO rast_lib_ver; EXCEPTION WHEN undefined_function THEN rast_lib_ver := NULL; RAISE NOTICE 'Function postgis_raster_lib_version() not found. Is raster support enabled and rtpostgis.sql installed?'; END; fullver = 'POSTGIS="' || libver; IF svnver IS NOT NULL THEN fullver = fullver || ' r' || svnver; END IF; fullver = fullver || '"'; IF geosver IS NOT NULL THEN fullver = fullver || ' GEOS="' || geosver || '"'; END IF; IF sfcgalver IS NOT NULL THEN fullver = fullver || ' SFCGAL="' || sfcgalver || '"'; END IF; IF projver IS NOT NULL THEN fullver = fullver || ' PROJ="' || projver || '"'; END IF; IF gdalver IS NOT NULL THEN fullver = fullver || ' GDAL="' || gdalver || '"'; END IF; IF libxmlver IS NOT NULL THEN fullver = fullver || ' LIBXML="' || libxmlver || '"'; END IF; IF json_lib_ver IS NOT NULL THEN fullver = fullver || ' LIBJSON="' || json_lib_ver || '"'; END IF; -- fullver = fullver || ' DBPROC="' || dbproc || '"'; -- fullver = fullver || ' RELPROC="' || relproc || '"'; IF dbproc != relproc THEN fullver = fullver || ' (core procs from "' || dbproc || '" need upgrade)'; END IF; IF topo_scr_ver IS NOT NULL THEN fullver = fullver || ' TOPOLOGY'; IF topo_scr_ver != relproc THEN fullver = fullver || ' (topology procs from "' || topo_scr_ver || '" need upgrade)'; END IF; END IF; IF rast_lib_ver IS NOT NULL THEN fullver = fullver || ' RASTER'; IF rast_lib_ver != relproc THEN fullver = fullver || ' (raster lib from "' || rast_lib_ver || '" need upgrade)'; END IF; END IF; IF rast_scr_ver IS NOT NULL AND rast_scr_ver != relproc THEN fullver = fullver || ' (raster procs from "' || rast_scr_ver || '" need upgrade)'; END IF; RETURN fullver; END