[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-6-g7678d927d
git at osgeo.org
git at osgeo.org
Sun Dec 19 13:40:12 PST 2021
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 7678d927de8c1822a9b655966c3d2eb58ad1ae59 (commit)
from 092a15f9f4b15cafd9b3e654920219bdf2154fe0 (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 7678d927de8c1822a9b655966c3d2eb58ad1ae59
Author: Sandro Santilli <strk at kbt.io>
Date: Sun Dec 19 19:38:19 2021 +0100
Allow upgrades from <3.1 when using ST_Force{3D,3DM,3DZ,4D} in views
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 003d8b60f..0beca01aa 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -1382,6 +1382,7 @@ CREATE OR REPLACE FUNCTION ST_Force2D(geometry)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 parameter
+-- Replaces ST_Force3DZ(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3DZ(geom geometry, zvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
@@ -1390,6 +1391,7 @@ CREATE OR REPLACE FUNCTION ST_Force3DZ(geom geometry, zvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 parameter
+-- Replaces ST_Force3D(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3D(geom geometry, zvalue float8 default 0.0)
RETURNS geometry
AS 'SELECT @extschema at .ST_Force3DZ($1, $2)'
@@ -1398,6 +1400,7 @@ CREATE OR REPLACE FUNCTION ST_Force3D(geom geometry, zvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add mvalue=0.0 parameter
+-- Replaces ST_Force3DM(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force3DM(geom geometry, mvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm'
@@ -1406,6 +1409,7 @@ CREATE OR REPLACE FUNCTION ST_Force3DM(geom geometry, mvalue float8 default 0.0)
-- Availability: 2.1.0
-- Changed: 3.1.0 - add zvalue=0.0 and mvalue=0.0 parameters
+-- Replaces ST_Force4D(geometry) deprecated in 3.1.0
CREATE OR REPLACE FUNCTION ST_Force4D(geom geometry, zvalue float8 default 0.0, mvalue float8 default 0.0)
RETURNS geometry
AS 'MODULE_PATHNAME', 'LWGEOM_force_4d'
diff --git a/postgis/postgis_before_upgrade.sql b/postgis/postgis_before_upgrade.sql
index fd104bc8e..3ba6956bf 100644
--- a/postgis/postgis_before_upgrade.sql
+++ b/postgis/postgis_before_upgrade.sql
@@ -194,13 +194,6 @@ SELECT _postgis_drop_function_if_needed
'zoom integer, x integer, y integer, bounds geometry DEFAULT ''0102000020110F00000200000052107C45F81B73C152107C45F81B73C152107C45F81B734152107C45F81B7341''::geometry'
);
--- FUNCTION ST_Force3D, ST_Force3DZ, ST_Force3DM, ST_Force4DZ changed to add defaults in 3.1
--- These signatures were superseeded
-DROP FUNCTION IF EXISTS ST_Force3D(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force3DZ(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force3DM(geometry); -- Does not conflict
-DROP FUNCTION IF EXISTS ST_Force4D(geometry); -- Does not conflict
-
-- FUNCTION st_askml changed to add defaults in 3.0 / r17357
-- These signatures were superseeded
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index d7fb108a7..daf31951d 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -2,4 +2,5 @@ DROP VIEW IF EXISTS upgrade_view_test_overlay;
DROP VIEW IF EXISTS upgrade_view_test_unaryunion;
DROP VIEW IF EXISTS upgrade_view_test_subdivide;
DROP VIEW IF EXISTS upgrade_view_test_union;
+DROP VIEW IF EXISTS upgrade_view_test_force_dims;
DROP TABLE upgrade_test;
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index de661643d..07c54dda1 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -47,3 +47,14 @@ CREATE VIEW upgrade_view_test_subdivide AS
SELECT
ST_Subdivide(g1, 256) as geometry_subdivide
FROM upgrade_test;
+
+-- Add view using ST_ForceX function
+-- NOTE: 3.1.0 changed them from taking only geometry
+-- to also take optional zvalue/mvalue params
+CREATE VIEW upgrade_view_test_force_dims AS
+SELECT
+ ST_Force3D(g1) as geometry_force3d,
+ ST_Force3DZ(g1) as geometry_force3dz,
+ ST_Force3DM(g1) as geometry_force3dm,
+ ST_Force4D(g1) as geometry_force4d
+FROM upgrade_test;
-----------------------------------------------------------------------
Summary of changes:
postgis/postgis.sql.in | 4 ++++
postgis/postgis_before_upgrade.sql | 7 -------
regress/hooks/hook-after-upgrade.sql | 1 +
regress/hooks/hook-before-upgrade.sql | 11 +++++++++++
4 files changed, 16 insertions(+), 7 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list