[postgis-tickets] [SCM] PostGIS branch spatial-ref-sys-view updated. 3.2.0-458-g7afbc9640

git at osgeo.org git at osgeo.org
Tue Feb 1 16:34:43 PST 2022


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, spatial-ref-sys-view has been updated
  discards  a1ca28011b34575224e586bd6a47ed8e2a853161 (commit)
       via  7afbc96406cde4e7a4198f21cad5bfaf8144e0ac (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (a1ca28011b34575224e586bd6a47ed8e2a853161)
            \
             N -- N -- N (7afbc96406cde4e7a4198f21cad5bfaf8144e0ac)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 7afbc96406cde4e7a4198f21cad5bfaf8144e0ac
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Feb 1 15:22:40 2022 +0100

    Add spatial_ref_sys testing
    
    References #5024

diff --git a/regress/core/spatial_ref_sys.sql b/regress/core/spatial_ref_sys.sql
new file mode 100644
index 000000000..b2ac0fc62
--- /dev/null
+++ b/regress/core/spatial_ref_sys.sql
@@ -0,0 +1,23 @@
+BEGIN;
+
+-- https://trac.osgeo.org/postgis/ticket/5024
+SELECT '#5024', 'spatial_ref_sys entries' AS table_name, count(*) FROM spatial_ref_sys;
+
+INSERT INTO spatial_ref_sys(srid,auth_name,auth_srid,srtext,proj4text)
+ SELECT srid,'overridden',0,srtext,proj4text
+ FROM spatial_ref_sys WHERE srid = 4326;
+SELECT 'inserted_overridden_srid', srid, auth_name
+ FROM spatial_ref_sys
+ WHERE srid = 4326;
+
+DELETE FROM spatial_ref_sys WHERE srid = 4326;
+SELECT 'deleted_overridden_srid', srid, auth_name
+ FROM spatial_ref_sys
+ WHERE srid = 4326;
+
+UPDATE spatial_ref_sys SET auth_name = 'overridden' WHERE srid = 4326;
+SELECT 'updated_overridden_srid', srid, auth_name
+ FROM spatial_ref_sys
+ WHERE srid = 4326;
+
+ROLLBACK;
diff --git a/regress/core/spatial_ref_sys_expected b/regress/core/spatial_ref_sys_expected
new file mode 100644
index 000000000..531df8493
--- /dev/null
+++ b/regress/core/spatial_ref_sys_expected
@@ -0,0 +1,4 @@
+#5024|spatial_ref_sys entries|8500
+inserted_overridden_srid|4326|overridden
+deleted_overridden_srid|4326|EPSG
+updated_overridden_srid|4326|overridden
diff --git a/regress/core/tests.mk.in b/regress/core/tests.mk.in
index 2e4342230..91cd95937 100644
--- a/regress/core/tests.mk.in
+++ b/regress/core/tests.mk.in
@@ -94,6 +94,7 @@ TESTS += \
 	$(topsrcdir)/regress/core/simplifyvw \
 	$(topsrcdir)/regress/core/size \
 	$(topsrcdir)/regress/core/snaptogrid \
+	$(topsrcdir)/regress/core/spatial_ref_sys \
 	$(topsrcdir)/regress/core/split \
 	$(topsrcdir)/regress/core/sql-mm-serialize \
 	$(topsrcdir)/regress/core/sql-mm-circularstring \
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index 221a62ebf..3c575bb8d 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1432,6 +1432,3 @@ SELECT
 	'#5008',
 	ST_DWithin('POINT EMPTY', 'POINT(0 0)', 'Inf'),
 	ST_DWithin('POINT(1 1)', 'POLYGON EMPTY', 'Inf');
-
--- https://trac.osgeo.org/postgis/ticket/5024
---SELECT '#5024', 'spatial_ref_sys entries' AS table_name, count(*) FROM spatial_ref_sys;
diff --git a/regress/hooks/hook-after-upgrade.sql b/regress/hooks/hook-after-upgrade.sql
index 0ca56e675..28ea96f1d 100644
--- a/regress/hooks/hook-after-upgrade.sql
+++ b/regress/hooks/hook-after-upgrade.sql
@@ -21,3 +21,7 @@ DROP FUNCTION IF EXISTS st_askml_deprecated_by_postgis_200(geometry,integer);
 DROP FUNCTION IF EXISTS st_askml_deprecated_by_postgis_200(geography,integer);
 DROP FUNCTION IF EXISTS st_dwithin_deprecated_by_postgis_300(geography,geography,float8);
 DROP FUNCTION IF EXISTS st_dwithin_deprecated_by_postgis_300(text,text,float8);
+
+-- Delete custom SRID from spatial_ref_sys_user
+DELETE FROM spatial_ref_sys_user
+WHERE srid = 900100;
diff --git a/regress/hooks/hook-before-upgrade.sql b/regress/hooks/hook-before-upgrade.sql
index 7185b56bc..cece0ff38 100644
--- a/regress/hooks/hook-before-upgrade.sql
+++ b/regress/hooks/hook-before-upgrade.sql
@@ -79,3 +79,7 @@ FROM upgrade_test;
 -- the upgrade procedure to replace them all
 UPDATE pg_proc SET probin = probin || '-uninstalled'
 WHERE probin like '%postgis%';
+
+-- Insert a custom SRID to spatial_ref_sys
+INSERT INTO spatial_ref_sys(srid,auth_name,auth_srid,srtext,proj4text)
+VALUES (900100, 'pgis_test', 2, 'srtext', 'prjtext');

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

Summary of changes:
 regress/core/spatial_ref_sys.sql      | 1 -
 regress/hooks/hook-after-upgrade.sql  | 4 ++++
 regress/hooks/hook-before-upgrade.sql | 4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list