[SCM] PostGIS branch stable-3.5 updated. 3.5.7-1-gb1bf0d52d

git at osgeo.org git at osgeo.org
Wed Jun 10 15:25:48 PDT 2026


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  b1bf0d52d1f1eb043b2b6aeecfd2edec4cdb65c8 (commit)
      from  9816f82458db774e62906cfb2c4f01f8b262c862 (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 b1bf0d52d1f1eb043b2b6aeecfd2edec4cdb65c8
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jun 10 15:23:49 2026 -0700

    Handle 32-bit platform in fromFlatGeobuf

diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c
index 048e9fbe0..fcab4850d 100644
--- a/postgis/flatgeobuf.c
+++ b/postgis/flatgeobuf.c
@@ -360,7 +360,7 @@ static void decode_properties(struct flatgeobuf_decode_ctx *ctx, Datum *values,
 			if (offset + sizeof(uint32_t) > size)
 				elog(ERROR, "flatgeobuf: decode_properties: Invalid size for uint value");
 			memcpy(&value, data + offset, sizeof(uint32_t));
-			values[ci] = UInt32GetDatum(value);
+			values[ci] = Int64GetDatum((int64_t)(uint64_t) value);
 			offset += sizeof(uint32_t);
 			break;
 		}
@@ -387,10 +387,7 @@ static void decode_properties(struct flatgeobuf_decode_ctx *ctx, Datum *values,
 			if (offset + sizeof(float) > size)
 				elog(ERROR, "flatgeobuf: decode_properties: Invalid size for float value");
 			memcpy(&value, data + offset, sizeof(float));
-			if (getBaseType(TupleDescAttr(ctx->tupdesc, ci)->atttypid) == FLOAT8OID)
-				values[ci] = Float8GetDatum((double) value);
-			else
-				values[ci] = Float4GetDatum(value);
+			values[ci] = Float4GetDatum(value);
 			offset += sizeof(float);
 			break;
 		}
diff --git a/postgis/lwgeom_in_flatgeobuf.c b/postgis/lwgeom_in_flatgeobuf.c
index 773b50f98..9b8f53874 100644
--- a/postgis/lwgeom_in_flatgeobuf.c
+++ b/postgis/lwgeom_in_flatgeobuf.c
@@ -88,24 +88,19 @@ flatgeobuf_type_compatible(uint8_t fgb_type, Oid pgtype)
 	{
 	case flatgeobuf_column_type_bool:
 		return pgtype == BOOLOID;
-	/* small integer types: allow widening into larger signed ints */
 	case flatgeobuf_column_type_byte:
 	case flatgeobuf_column_type_ubyte:
 	case flatgeobuf_column_type_short:
 	case flatgeobuf_column_type_ushort:
-		return pgtype == INT2OID || pgtype == INT4OID || pgtype == INT8OID;
-	/* int32: allow widening to bigint */
+		return pgtype == INT2OID;
 	case flatgeobuf_column_type_int:
-		return pgtype == INT4OID || pgtype == INT8OID;
-	/* uint32 max exceeds INT4, must land in bigint */
+		return pgtype == INT4OID;
 	case flatgeobuf_column_type_uint:
-		return pgtype == INT8OID;
 	case flatgeobuf_column_type_long:
 	case flatgeobuf_column_type_ulong:
 		return pgtype == INT8OID;
-	/* float: allow widening to double (explicit conversion handled in decode) */
 	case flatgeobuf_column_type_float:
-		return pgtype == FLOAT4OID || pgtype == FLOAT8OID;
+		return pgtype == FLOAT4OID;
 	case flatgeobuf_column_type_double:
 		return pgtype == FLOAT8OID;
 	case flatgeobuf_column_type_string:

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

Summary of changes:
 postgis/flatgeobuf.c           |  7 ++-----
 postgis/lwgeom_in_flatgeobuf.c | 11 +++--------
 2 files changed, 5 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list