[SCM] PostGIS branch stable-3.2 updated. 3.2.10-9-g3c9ce4ec7
git at osgeo.org
git at osgeo.org
Wed Jun 10 15:26:06 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.2 has been updated
via 3c9ce4ec7e3dee817ae8a2bc6209f5cebee7aea6 (commit)
from 49f46836bd6c55167d60532b5b9b382f4b9a05d6 (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 3c9ce4ec7e3dee817ae8a2bc6209f5cebee7aea6
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 d8eea1562..6deece699 100644
--- a/postgis/flatgeobuf.c
+++ b/postgis/flatgeobuf.c
@@ -361,7 +361,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;
}
@@ -388,10 +388,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