[SCM] PostGIS branch stable-3.5 updated. 3.5.1-3-g395ec2242

git at osgeo.org git at osgeo.org
Tue Jan 7 13:15:10 PST 2025


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.5 has been updated
       via  395ec2242b3187f786ea84f1f267a6a4ebc6ba81 (commit)
      from  226e51356c9cde970cb54d66e59baf389104c536 (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 395ec2242b3187f786ea84f1f267a6a4ebc6ba81
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Jan 7 13:50:42 2025 -0500

    pg_upgrade postgis_sfcgal failing
    because of missing
    ST_ConstrainDelaunayTriangles signature
    
    Closes #5833 for PostGIS 3.5.2

diff --git a/NEWS b/NEWS
index 9edf304ff..2836a7608 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ PostgreSQL 12-17 required. GEOS 3.8+ required. Proj 6.1+ required.
 * Bug fixes *
 
 - #5677, Retain SRID during unary union (Paul Ramsey)
+- #5833, pg_upgrade fix for postgis_sfcgal (Regina Obe)
 
 
 PostGIS 3.5.1
diff --git a/sfcgal/Makefile.in b/sfcgal/Makefile.in
index 0e6424e79..61ebe0842 100644
--- a/sfcgal/Makefile.in
+++ b/sfcgal/Makefile.in
@@ -46,7 +46,7 @@ SQL_OBJS = \
 
 # Objects to build using PGXS
 
-OBJS = lwgeom_sfcgal.o
+OBJS = lwgeom_sfcgal.o postgis_sfcgal_legacy.o
 
 # Libraries to link into the module (proj, geos)
 #
diff --git a/sfcgal/postgis_sfcgal_legacy.c b/sfcgal/postgis_sfcgal_legacy.c
new file mode 100644
index 000000000..cbd669928
--- /dev/null
+++ b/sfcgal/postgis_sfcgal_legacy.c
@@ -0,0 +1,55 @@
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.net
+ *
+ * PostGIS is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PostGIS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PostGIS.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ **********************************************************************
+ *
+ * Copyright (C) 2025 Regina Obe <lr at pcorp.us>
+ *
+ **********************************************************************/
+/******************************************************************************
+ * This file is to hold functions we no longer use,
+ * but we need to keep because they were used at one time behind SQL API functions.
+ * This is to ease pg_upgrade upgrades
+ *
+ * All functions in this file should throw an error telling the user to upgrade
+ * the install
+ *
+ *****************************************************************************/
+
+#include "postgres.h"
+#include "utils/builtins.h"
+#include "../postgis_config.h"
+#include "lwgeom_pg.h"
+
+#define POSTGIS_DEPRECATE(version, funcname) \
+	Datum funcname(PG_FUNCTION_ARGS); \
+	PG_FUNCTION_INFO_V1(funcname); \
+	Datum funcname(PG_FUNCTION_ARGS) \
+	{ \
+		ereport(ERROR, (\
+			errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
+			errmsg("A stored procedure tried to use deprecated C function '%s'", \
+			       __func__), \
+			errdetail("Library function '%s' was deprecated in PostGIS %s", \
+			          __func__, version), \
+			errhint("Consider running: SELECT postgis_extensions_upgrade()") \
+		)); \
+		PG_RETURN_POINTER(NULL); \
+	}
+
+POSTGIS_DEPRECATE("3.4.0", ST_ConstrainedDelaunayTriangles)
\ No newline at end of file

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

Summary of changes:
 NEWS                                               |  1 +
 sfcgal/Makefile.in                                 |  2 +-
 .../postgis_sfcgal_legacy.c                        | 47 ++++++++++------------
 3 files changed, 23 insertions(+), 27 deletions(-)
 copy raster/rt_pg/rtpg_legacy.c => sfcgal/postgis_sfcgal_legacy.c (57%)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list