[SCM] PostGIS branch master updated. 3.5.0-459-ga203d073c

git at osgeo.org git at osgeo.org
Tue Jul 15 00:14:33 PDT 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, master has been updated
       via  a203d073c7a0fdce114ec11199db6f395fe5fb99 (commit)
       via  b0b661f25eb86528a210eb5ae6be11f4d39203f8 (commit)
      from  43110503fda73aa1938e4eddccd92785f82d094e (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 a203d073c7a0fdce114ec11199db6f395fe5fb99
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Jul 15 03:13:55 2025 -0400

    Don't have winnie package shp2pgsql-gui if gtk2 is not available
    This is because new winnie chain with gcc 13 doesn't work with gtk2

diff --git a/ci/winnie/package_postgis.sh b/ci/winnie/package_postgis.sh
index 13af0b6f2..dc7f9680c 100644
--- a/ci/winnie/package_postgis.sh
+++ b/ci/winnie/package_postgis.sh
@@ -47,21 +47,10 @@ mkdir -p $outdir/share/contrib/postgis-${POSTGIS_MINOR_VER}/proj
 mkdir -p $outdir/share/extension
 mkdir $outdir/bin
 mkdir $outdir/lib
-mkdir $outdir/bin/postgisgui
-mkdir $outdir/bin/postgisgui/share
-mkdir $outdir/bin/postgisgui/lib
+
 mkdir $outdir/utils
-cp ${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll  $outdir/bin/postgisgui
 
-cp ${PGPATH}/bin/libpq.dll  $outdir/bin/postgisgui
-#cp ${PGPATHEDB}/bin/libiconv2.dll  $outdir/bin/postgisgui
-cp ${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin/libicon*.dll $outdir/bin/postgisgui
-cp ${PGPATHEDB}/bin/libintl*.dll $outdir/bin/postgisgui
 
-#cp ${PGPATHEDB}/bin/ssleay32.dll $outdir/bin/postgisgui
-#cp ${PGPATHEDB}/bin/libeay32.dll $outdir/bin/postgisgui
-#cp ${PGPATHEDB}/bin/libcrypto-1_1-x64.dll $outdir/bin/postgisgui
-#cp ${PGPATHEDB}/bin/libssl-1_1-x64.dll $outdir/bin/postgisgui
 
 #pg 15 is shipping with newer ssl
 cp ${PGPATHEDB}/bin/libcrypto-3-x64.dll $outdir/bin/postgisgui
@@ -70,23 +59,42 @@ cp ${PGPATHEDB}/bin/libssl-3-x64.dll $outdir/bin/postgisgui
 
 cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libstdc++-6.dll $outdir/bin
 cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libgcc*.dll $outdir/bin
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin/postgisgui
-cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libstdc++-6.dll $outdir/bin/postgisgui
-cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libgcc*.dll $outdir/bin/postgisgui
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/etc $outdir/bin/postgisgui
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/share/themes $outdir/bin/postgisgui/share
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/gtk-2.0 $outdir/bin/postgisgui/lib
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/*.dll $outdir/bin/postgisgui/lib
-cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/gdk-pixbuf-2.0 $outdir/bin/postgisgui/lib
+
+# don't package postgisgui if we don't have gtk2
+if [ -n "${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}" ]; then
+	mkdir $outdir/bin/postgisgui
+	mkdir $outdir/bin/postgisgui/share
+	mkdir $outdir/bin/postgisgui/lib
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin/postgisgui
+	cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libstdc++-6.dll $outdir/bin/postgisgui
+	cp /c/ming${OS_BUILD}${GCC_TYPE}/mingw${OS_BUILD}/bin/libgcc*.dll $outdir/bin/postgisgui
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/etc $outdir/bin/postgisgui
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/share/themes $outdir/bin/postgisgui/share
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/gtk-2.0 $outdir/bin/postgisgui/lib
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/*.dll $outdir/bin/postgisgui/lib
+	cp -r ${PROJECTS}/gtkw${OS_BUILD}${GCC_TYPE}/lib/gdk-pixbuf-2.0 $outdir/bin/postgisgui/lib
+	cp ${PGPATHEDB}/bin/libintl*.dll $outdir/bin/postgisgui
+	cp ${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll  $outdir/bin/postgisgui
+
+	cp ${PGPATH}/bin/libpq.dll  $outdir/bin/postgisgui
+	#cp ${PGPATHEDB}/bin/libiconv2.dll  $outdir/bin/postgisgui
+	cp ${PROJECTS}/rel-libiconv-${ICON_VER}w${OS_BUILD}${GCC_TYPE}/bin/libicon*.dll $outdir/bin/postgisgui
+	#proj
+	cp ${PROJ_PATH}/bin/*.dll $outdir/bin/postgisgui
+	#geos
+	cp -p ${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin/postgisgui
+
+	cp loader/shp2pgsql-gui.exe ${RELDIR}/${RELVERDIR}/bin/postgisgui
+	cp loader/.libs/shp2pgsql-gui.exe ${RELDIR}/${RELVERDIR}/bin/postgisgui
+fi;
 
 # proj
 cp ${PROJ_LIB}/* $outdir/share/contrib/postgis-${POSTGIS_MINOR_VER}/proj
 cp ${PROJ_PATH}/bin/*.dll $outdir/bin
-cp ${PROJ_PATH}/bin/*.dll $outdir/bin/postgisgui
+
 
 # geos
 cp -p ${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin
-cp -p ${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin/postgisgui
 
 #for protobuf
 cp ${PROJECTS}/protobuf/rel-${PROTOBUF_VER}w${OS_BUILD}${GCC_TYPE}/bin/libprotobuf-c-*.dll $outdir/bin
@@ -116,8 +124,6 @@ if [ -n "$SFCGAL_VER"  ]; then
 
 	#cp -p ${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin
 	cp -p ${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/*.dll $outdir/bin
-	# cp -p ${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/bin/*.dll $outdir/bin/postgisgui
-	# cp -p ${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE}/lib/*.dll $outdir/bin/postgisgui
 fi;
 
 echo "PROTOBUF VERSION: ${PROTOBUF_VER} https://github.com/google/protobuf" >> $verfile
@@ -147,8 +153,6 @@ cp loader/shp2pgsql.exe ${RELDIR}/${RELVERDIR}/bin
 cp loader/.libs/shp2pgsql.exe ${RELDIR}/${RELVERDIR}/bin
 cp loader/pgsql2shp.exe ${RELDIR}/${RELVERDIR}/bin
 cp loader/.libs/pgsql2shp.exe ${RELDIR}/${RELVERDIR}/bin
-cp loader/shp2pgsql-gui.exe ${RELDIR}/${RELVERDIR}/bin/postgisgui
-cp loader/.libs/shp2pgsql-gui.exe ${RELDIR}/${RELVERDIR}/bin/postgisgui
 cp topology/loader/* ${RELDIR}/${RELVERDIR}/bin
 
 #cp liblwgeom/.libs/*.dll ${RELDIR}/${RELVERDIR}/bin/postgisgui

commit b0b661f25eb86528a210eb5ae6be11f4d39203f8
Author: Ayo Adesugba <ayoadesugba at gmail.com>
Date:   Mon Jul 14 23:47:09 2025 -0400

    References https://git.osgeo.org/gitea/postgis/postgis/pulls/258
    Some to address issues noted by coderabbitai in
    References https://github.com/postgis/postgis/pull/822
    
    References #3110
    
     * Use BIGINT consistently
     * Add documentation for new variables (topoid and useslargeids) in CreateTopology
     * Refactor logging levels in SQL scripts and enhance logic when manually upgrading user type attributes
     * Fix layer ID validation and streamline SQL execution in AddTopoGeometryColumn function
     * Refactor UpgradeTopology function to improve SQL formatting and consistency in ALTER TABLE statements.
     * Fix bug in update logic for useslargeids after upgrade.
     * Add validation step for loaded topology in load_large_topology.sql.in

diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml
index 02534b761..3854a4a93 100644
--- a/doc/extras_topology.xml
+++ b/doc/extras_topology.xml
@@ -1367,11 +1367,11 @@ ANALYZE themselves, to use updated statistics.
 					<funcprototype>
 						<funcdef>integer <function>CreateTopology</function></funcdef>
 						<paramdef><type>name </type> <parameter>topology_schema_name</parameter></paramdef>
-						<paramdef><type>integer </type> <parameter>srid</parameter></paramdef>
-						<paramdef><type>double precision </type> <parameter>prec</parameter></paramdef>
-						<paramdef><type>boolean </type> <parameter>hasz</parameter></paramdef>
-                        <paramdef><type>integer </type> <parameter>topoid</parameter></paramdef>
-                        <paramdef><type>boolean </type> <parameter>useslargeids</parameter></paramdef>
+						<paramdef choice="opt"><type>integer </type> <parameter>srid</parameter></paramdef>
+						<paramdef choice="opt"><type>double precision </type> <parameter>prec</parameter></paramdef>
+						<paramdef choice="opt"><type>boolean </type> <parameter>hasz</parameter></paramdef>
+                        <paramdef choice="opt"><type>integer </type> <parameter>topoid</parameter></paramdef>
+                        <paramdef choice="opt"><type>boolean </type> <parameter>useslargeids</parameter></paramdef>
 					</funcprototype>
 				</funcsynopsis>
 			</refsynopsisdiv>
@@ -1386,7 +1386,7 @@ ANALYZE themselves, to use updated statistics.
 				It returns the id of the topology.
 				</para>
 
- 				<para>The <varname>srid</varname> is the <link linkend="spatial_ref_sys">spatial reference system</link> SRID for the topology.
+ 				<para>The <varname>srid</varname> is the <link linkend="spatial_ref_sys">spatial reference system</link> SRID for the topology. The SRID defaults to -1 (unknown) if not specified.
 				</para>
 
 				<para>The tolerance <varname>prec</varname> is measured in the units of the spatial reference system.
@@ -1395,6 +1395,10 @@ ANALYZE themselves, to use updated statistics.
 
 				<para><varname>hasz</varname> defaults to false if not specified. </para>
 
+                <para><varname>topoid</varname> optional explicit identifier (allows deterministic topology id assignment, needs to be unique)</para>
+
+                <para><varname>useslargeids</varname> optional, defaults to false. If true, the topology will be created to support large ids (int8) for topology and primitive ids.</para>
+
                 <para>This is similar to the SQL/MM <xref linkend="ST_InitTopoGeo"/> but has more functionality.</para>
 
                 <!-- use this format if new function -->
diff --git a/postgis/common_before_upgrade.sql b/postgis/common_before_upgrade.sql
index 555eb2321..6258a3ddb 100644
--- a/postgis/common_before_upgrade.sql
+++ b/postgis/common_before_upgrade.sql
@@ -119,7 +119,7 @@ BEGIN
 		cast_source,
 		cast_target
 	);
-  RAISE INFO 'SQL: %', sql;
+  RAISE DEBUG 'SQL: %', sql;
 	EXECUTE sql;
 
 END;
@@ -200,12 +200,12 @@ BEGIN
 		EXCEPTION
 		WHEN others THEN
 			GET STACKED DIAGNOSTICS detail := PG_EXCEPTION_DETAIL;
-			RAISE INFO 'Could not modify % from % to %, got % (%)',
+			RAISE WARNING 'Could not modify % from % to %, got % (%)',
 				domain_name, old_domain_type, new_domain_type, SQLERRM, SQLSTATE USING DETAIL = detail;
 			RETURN;
 		END;
 	ELSE
-		RAISE INFO 'Deprecated domain (topology.% with type %) does not exist', domain_name, old_domain_type;
+		RAISE DEBUG 'Deprecated domain (topology.% with type %) does not exist', domain_name, old_domain_type;
 		RETURN;
 	END IF;
 END;
@@ -274,6 +274,7 @@ BEGIN
     	FROM information_schema.columns
     	WHERE table_name = 'pg_attribute'
       AND column_name <> ALL (excluded_columns)
+			AND column_name NOT LIKE 'oid%' -- Exclude system columns
   		LOOP
     		sql := sql || format('%I = src.%I, ', colname, colname);
   		END LOOP;
@@ -308,18 +309,11 @@ BEGIN
 		--RAISE INFO 'SQL: %', sql;
 		EXECUTE sql;
 
-		--GET DIAGNOSTICS num_updated = ROW_COUNT;
-
-		-- IF num_updated = 0 THEN
-		-- 	RAISE WARNING 'No attributes updated for %.% from % to %', type_name, attr_name, old_attr_type, new_attr_type;
-		-- 	RETURN;
-		-- END IF;
-
 		RAISE INFO 'Upgraded %.% from % to %', type_name, attr_name, old_attr_type, new_attr_type;
 	EXCEPTION
 	WHEN others THEN
 		GET STACKED DIAGNOSTICS detail := PG_EXCEPTION_DETAIL;
-		RAISE INFO 'Could not modify %.% from % to %, got % (%)',
+		RAISE WARNING 'Could not modify %.% from % to %, got % (%)',
 			type_name, attr_name, old_attr_type, new_attr_type, SQLERRM, SQLSTATE
 		USING DETAIL = detail;
 		RETURN;
diff --git a/topology/sql/manage/AddTopoGeometryColumn.sql.in b/topology/sql/manage/AddTopoGeometryColumn.sql.in
index f09638273..733869526 100644
--- a/topology/sql/manage/AddTopoGeometryColumn.sql.in
+++ b/topology/sql/manage/AddTopoGeometryColumn.sql.in
@@ -36,7 +36,7 @@ DECLARE
   tbl varchar;
   sql TEXT;
 BEGIN
-  IF layerid IS NOT NULL and layerid < 0 THEN
+  IF layerid IS NOT NULL and layerid <= 0 THEN
     RAISE EXCEPTION 'Invalid Layer ID % (must be > 0)', layerid;
   END IF;
 
@@ -129,18 +129,7 @@ BEGIN
     || quote_literal(col) || ','
     || intlayertype || ');';
 
-  EXECUTE 'INSERT INTO '
-       'topology.layer(topology_id, '
-       'layer_id, level, child_id, schema_name, '
-       'table_name, feature_column, feature_type) '
-       'VALUES ('
-    || topoid || ','
-    || newlayer_id || ',' || COALESCE(newlevel, 0) || ','
-    || COALESCE(child::text, 'NULL') || ','
-    || quote_literal(schema) || ','
-    || quote_literal(tbl) || ','
-    || quote_literal(col) || ','
-    || intlayertype || ');';
+  EXECUTE sql;
 
   --
   -- Create a sequence for TopoGeometries in this new layer
diff --git a/topology/sql/manage/UpgradeTopology.sql.in b/topology/sql/manage/UpgradeTopology.sql.in
index 6261fec64..34d318d9a 100644
--- a/topology/sql/manage/UpgradeTopology.sql.in
+++ b/topology/sql/manage/UpgradeTopology.sql.in
@@ -80,11 +80,11 @@ BEGIN
 		SELECT setval('%1$I.face_face_id_seq', %2$s);
 
 		ALTER TABLE %1$I.face
-    	ALTER COLUMN face_id SET DEFAULT nextval('%1$I.face_face_id_seq');
+      ALTER COLUMN face_id SET DEFAULT nextval('%1$I.face_face_id_seq');
 
 		-- Upgrade the edge_data table
-  		-- Drop the edge view
-    	DROP VIEW IF EXISTS %1$I.edge;
+  	-- Drop the edge view
+    DROP VIEW IF EXISTS %1$I.edge;
 
 		ALTER TABLE %1$I.edge_data
     	ALTER COLUMN edge_id TYPE BIGINT;
@@ -164,40 +164,41 @@ BEGIN
 		);
 
 		-- Upgrade the node table
-	    ALTER TABLE %1$I.node
+	  ALTER TABLE %1$I.node
 	    ALTER COLUMN node_id TYPE BIGINT;
-		
-	    ALTER TABLE %1$I.node
+
+	  ALTER TABLE %1$I.node
 	    ALTER COLUMN node_id DROP DEFAULT;
 
-    	DROP SEQUENCE %1$I.node_node_id_seq;
+    DROP SEQUENCE %1$I.node_node_id_seq;
 
-    	CREATE SEQUENCE %1$I.node_node_id_seq AS BIGINT;
+    CREATE SEQUENCE %1$I.node_node_id_seq AS BIGINT;
 
 		SELECT setval('%1$I.node_node_id_seq', %4$s);
 
 		ALTER TABLE %1$I.node
     	ALTER COLUMN node_id SET DEFAULT nextval('%1$I.node_node_id_seq');
 
-	    ALTER TABLE %1$I.node
+	  ALTER TABLE %1$I.node
 	    ALTER COLUMN containing_face TYPE BIGINT;
 
 		-- Upgrade the relation table
-	    ALTER TABLE %1$I.relation
+	  ALTER TABLE %1$I.relation
 	    ALTER COLUMN topogeo_id TYPE BIGINT;
 
-	    ALTER TABLE %1$I.relation
+	  ALTER TABLE %1$I.relation
 	    ALTER COLUMN element_id TYPE BIGINT;
 
   		-- Update the topology table
-	    UPDATE topology.topology
-	    SET useslargeids = true
-	    WHERE id = topology.id;
-	$$,
-	toponame,
-	face_currval,
-	edge_currval,
-	node_currval
+	  UPDATE topology.topology
+	  SET useslargeids = true
+	  WHERE id = %5$s;
+    $$,
+    toponame,
+    face_currval,
+    edge_currval,
+    node_currval,
+    topo.id
   );
 
   --RAISE INFO '%', sql;
diff --git a/topology/sql/query/getfacebypoint.sql.in b/topology/sql/query/getfacebypoint.sql.in
index f5d267585..a7849f56b 100644
--- a/topology/sql/query/getfacebypoint.sql.in
+++ b/topology/sql/query/getfacebypoint.sql.in
@@ -37,7 +37,7 @@ $BODY$
 DECLARE
   rec RECORD;
   sql TEXT;
-  sideFaces INT8[];
+  sideFaces BIGINT[];
 BEGIN
 
   -- Check if any edge intersects the query circle
diff --git a/topology/test/load_large_topology.sql.in b/topology/test/load_large_topology.sql.in
index 92fa596fe..c3cfb8d9d 100644
--- a/topology/test/load_large_topology.sql.in
+++ b/topology/test/load_large_topology.sql.in
@@ -195,5 +195,10 @@ SELECT NULL FROM setval('large_city_data.edge_data_edge_id_seq', 1000000000026);
 -- Set face minimum bounding rectangle
 UPDATE large_city_data.face set mbr = ST_SetSRID( ( select st_extent(geom) from large_city_data.edge where left_face = face_id or right_face = face_id ), @SRID@ ) where face_id != 0;
 
+-- Validate the loaded topology
+SELECT 'load_validation', *
+FROM ValidateTopology('large_city_data')
+WHERE error IS NOT NULL;
+
 END;
 

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

Summary of changes:
 ci/winnie/package_postgis.sh                     | 56 +++++++++++++-----------
 doc/extras_topology.xml                          | 16 ++++---
 postgis/common_before_upgrade.sql                | 16 +++----
 topology/sql/manage/AddTopoGeometryColumn.sql.in | 15 +------
 topology/sql/manage/UpgradeTopology.sql.in       | 39 +++++++++--------
 topology/sql/query/getfacebypoint.sql.in         |  2 +-
 topology/test/load_large_topology.sql.in         |  5 +++
 7 files changed, 73 insertions(+), 76 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list