[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 75d0d13258a85da2944ad45ca1ae27ca129906a2
git at osgeo.org
git at osgeo.org
Fri Dec 27 00:41:00 PST 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.0 has been updated
via 75d0d13258a85da2944ad45ca1ae27ca129906a2 (commit)
from 9df916de87982009fdf0c903125b964e08d33f43 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 75d0d13258a85da2944ad45ca1ae27ca129906a2
Author: Regina Obe <lr at pcorp.us>
Date: Fri Dec 27 03:40:55 2019 -0500
postgis_extensions_upgrade change to allow repackaging postgis_tiger_geocoder and dealing with non-standard schema postgis installs. References #4610 and Closes #4581 for PostGIS 3.0.1
diff --git a/NEWS b/NEWS
index 0179022..9100c3d 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,8 @@ XXXX/XX/XX
- #4600, Improve precision of ST_TileEnvelope (Raúl Marín)
- #4605, Fix postgis_upgrade.pl with PostgreSQL 12 (Matti Linnanvuori)
- #4606, Respect user's LDFLAGS in postgis module build (Sandro Santilli)
-
+ - #4610, Add in logic to install postgis_tiger_geocoder from unpackaged (Regina obe)
+ - #4581, installing postgis_raster from unpackaged tries to use wrong schema
PostGIS 3.0.0
2019/10/20
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 174b4a8..58141ff 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -2793,6 +2793,7 @@ AS $$
$$ LANGUAGE 'sql' STABLE;
-- Availability: 2.5.0
+-- Changed: 3.0.1 install from unpackaged should include postgis schema #4581
-- Changed: 3.0.0 also upgrade postgis_raster if it exists
CREATE OR REPLACE FUNCTION postgis_extensions_upgrade() RETURNS text
AS $$
@@ -2837,9 +2838,18 @@ BEGIN
JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid )
WHERE n.nspname = 'topology' AND c.relname = 'topology') )
- -- TODO: How do we tell if PostGIS Tiger Geocoder is available ?
+ OR ( rec.name = 'postgis_tiger_geocoder' AND EXISTS (
+ SELECT 1 FROM pg_catalog.pg_class c
+ JOIN pg_catalog.pg_namespace n ON (c.relnamespace = n.oid )
+ WHERE n.nspname = 'tiger' AND c.relname = 'geocode_settings') )
THEN
- sql = 'CREATE EXTENSION ' || rec.name || ' FROM unpackaged';
+ --force install in same schema as postgis only if postgis extension is installed
+ IF rec.name NOT IN('postgis', 'postgis_topology', 'postgis_tiger_geocoder') AND EXISTS (SELECT 1 FROM pg_catalog.pg_extension WHERE extname = 'postgis') THEN
+ sql = 'CREATE EXTENSION ' || rec.name || ' FROM unpackaged SCHEMA '
+ || quote_ident( (SELECT ns.nspname FROM pg_catalog.pg_extension AS e INNER JOIN pg_catalog.pg_namespace AS ns ON e.extnamespace = ns.oid WHERE extname = 'postgis')) || ';';
+ ELSE
+ sql = 'CREATE EXTENSION ' || rec.name || ' FROM unpackaged;';
+ END IF;
RAISE NOTICE 'Packaging extension %', rec.name;
RAISE DEBUG '%', sql;
EXECUTE sql;
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 ++-
postgis/postgis.sql.in | 14 ++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list