[SCM] postgis.net branch website updated. clarity-final-124-g8e8b0c1

git at osgeo.org git at osgeo.org
Sun Oct 27 13:38:38 PDT 2024


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.net".

The branch, website has been updated
       via  8e8b0c156e81f15fc91b3a0c1ff05650be677238 (commit)
      from  80bdb68b125bd865bca400fedbf66639514d0167 (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 8e8b0c156e81f15fc91b3a0c1ff05650be677238
Author: Regina Obe <lr at pcorp.us>
Date:   Sun Oct 27 16:38:34 2024 -0400

    Update postgis schema move tip as the old instructions don't work for postgis 3.5+

diff --git a/content/documentation/tips/tip-move-postgis-schema.md b/content/documentation/tips/tip-move-postgis-schema.md
index e64703d..1c3fbe6 100644
--- a/content/documentation/tips/tip-move-postgis-schema.md
+++ b/content/documentation/tips/tip-move-postgis-schema.md
@@ -5,7 +5,7 @@ layout: post
 category: tips
 tags: [newbie, upgrade]
 author: Regina Obe
-date: "2017-11-07"
+date: "2024-10-25"
 thumbnail:
 geekdocHidden: true
 geekdocHiddenTocTree: false
@@ -32,7 +32,9 @@ Now lets create a new schema to move it and add this schema to search_path
 CREATE SCHEMA postgis;
 
 ALTER DATABASE mydb
-SET search_path = public,postgis;
+ SET search_path = public,postgis;
+
+GRANT USAGE ON SCHEMA postgis to public;
 ```
 
 If you are running PostGIS 2.3 or higher, trying to move to a different schema
@@ -58,15 +60,27 @@ UPDATE pg_extension
 ALTER EXTENSION postgis
   SET SCHEMA postgis;
 
--- Force an upgrade through a dummy version
+-- Force an upgrade toh a dummy version
+-- For PostGIS 3.5.0+ do
 ALTER EXTENSION postgis
-  UPDATE TO "2.4.1next";
+  UPDATE TO "ANY";
 
--- Force a second upgrade to remove references to the dummy version
+-- For PostGIS 3.4 and lower use next
 ALTER EXTENSION postgis
-  UPDATE TO "2.4.1";
+  UPDATE TO "3.4.3next";
+
+-- Force a second upgrade to do the real upgrade
+ALTER EXTENSION postgis UPDATE;
 ```
 
-Note the use of the extension version that includes `next`.
+Note the use of the extension version that includes `next` or `ANY`.
 
-The `next` version step is needed in order to upgrade all the schema qualified function references to the new schema location.  `next` is designed to allow upgrading a postgis extension to a version it is already on.
+The `next` or `ANY` version step is needed in order to upgrade to a version other than current version
+because same version to same version updates aren't allowed by the extension system.
+The final upgrade does the work of upgrading to the latest installed version.
+
+In the process all functions are reinstalled with the `@extschema@` variable in the scripts
+now referencing the new schema location.
+
+**NOTE**: if you have postgis_raster installed as well, repeat the same above steps with *postgis_raster*.
+postgis_raster will not work properly unless it is installed in the same schema as postgis.
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 .../documentation/tips/tip-move-postgis-schema.md  | 30 ++++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
postgis.net


More information about the postgis-tickets mailing list