[postgis-tickets] [SCM] PostGIS branch master updated. 6fbed378759eeec90413a372030e7312a6a66ea8
git at osgeo.org
git at osgeo.org
Mon Nov 18 11:21:10 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, master has been updated
via 6fbed378759eeec90413a372030e7312a6a66ea8 (commit)
from d8a3b2ec4708752e770daabbaa38bd10e54b8d25 (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 6fbed378759eeec90413a372030e7312a6a66ea8
Author: Regina Obe <lr at pcorp.us>
Date: Mon Nov 18 14:20:49 2019 -0500
Dispense with using @extschema@ doesn't seem to be resolved in non-extension install and use instead location where postgis is installed, if it is installed. Also aadd end ; statement
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 2b0c3d0..ae44b60 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -2851,10 +2851,12 @@ BEGIN
-- TODO: How do we tell if PostGIS Tiger Geocoder is available ?
THEN
- IF rec.name != 'postgis' THEN
- sql = 'CREATE EXTENSION ' || rec.name || ' FROM unpackaged SCHEMA @extschema@';
+ --force install in same schema as postgis only if postgis extension is installed
+ IF rec.name != 'postgis' 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';
+ sql = 'CREATE EXTENSION ' || rec.name || ' FROM unpackaged;';
END IF;
RAISE NOTICE 'Packaging extension %', rec.name;
RAISE DEBUG '%', sql;
-----------------------------------------------------------------------
Summary of changes:
postgis/postgis.sql.in | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list