From bec7e04b9c71d7d8150a404dcf190945b3846257 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Sat, 22 Nov 2025 19:00:50 +0100 Subject: [PATCH] Some more Npgsql 10 release note tweaks --- conceptual/EFCore.PG/release-notes/10.0.md | 4 ---- conceptual/Npgsql/release-notes/10.0.md | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/conceptual/EFCore.PG/release-notes/10.0.md b/conceptual/EFCore.PG/release-notes/10.0.md index a0a1c48f..7804dc25 100644 --- a/conceptual/EFCore.PG/release-notes/10.0.md +++ b/conceptual/EFCore.PG/release-notes/10.0.md @@ -161,7 +161,3 @@ See the [10.0.0 milestone](https://github.com/npgsql/efcore.pg/milestone/68?clos * `EF.Functions.Network()` and `EF.Functions.Merge()` have been changed to return the new .NET [`IPNetwork`](https://learn.microsoft.com/dotnet/api/system.net.ipnetwork) instead of the obsolete `NpgsqlCidr`. The new `IPNetwork` type works with all other functions as well (but no breaking changes were necessary). * The PostgreSQL network type `cidr` is now scaffolded to the new .NET [`IPNetwork`](https://learn.microsoft.com/dotnet/api/system.net.ipnetwork) type. The older Npgsql representation for `cidr` - the `NpgsqlCidr` type - has been obsoleted and will be removed in a future release. - -## Contributors - -To be completed. diff --git a/conceptual/Npgsql/release-notes/10.0.md b/conceptual/Npgsql/release-notes/10.0.md index 088e46c6..9e733386 100644 --- a/conceptual/Npgsql/release-notes/10.0.md +++ b/conceptual/Npgsql/release-notes/10.0.md @@ -57,6 +57,8 @@ Thanks to [@kirkbrauer](https://github.com/kirkbrauer) for contributing this fea * `NpgsqlConnection.Open` now wraps `SocketException` with `NpgsqlException` when hostname can't be resolved. * Metrics names are now more aligned to the OpenTelemetry standard (see breaking change note below). * The connection string now supports specifying `TargetSessionAttributes` when used with `NpgsqlDataSourceBuilder`. This means that code creating `NpgsqlDataSource` doesn't have to be aware that it's used with multiple hosts. +* The built-in geometry types (e.g. `NpgsqlBox`) can now be deconstructed. Thanks [@ddas09](https://github.com/ddas09) for contributing! +* The new `IDbTypeResolver` now allows remapping DbType values to arbitrary PostgreSQL types. ## Breaking changes @@ -91,3 +93,11 @@ This prevents accidental leak of queries and parameters when exceptions are logg ### NpgsqlConnection.BeginText{Import,Export}Async now return NpgsqlCopyTextReader instead of TextWriter The methods to start a text import/export operation have been changed to return a more specific `NpgsqlCopyTextReader`, rather than a general `TextWriter`; this was done since `NpgsqlCopyTextReader` exposes some additional APIs to allow cancelling and setting the timeout on a COPY operation. Since `NpgsqlCopyTextReader` extends `TextWriter`, this is a binary breaking change only - recompiling against the new version of Npgsql should work without any source changes. + +### NpgsqlParameter.DataTypeName now takes precedence over NpgsqlDbType + +NpgsqlParameter allows configuring which PostgreSQL is sent to the database via several methods: DataTypeName (for a PostgreSQL type name as a string), NpgsqlDbType (PG-specific enum), or DbType (database-agnostic enum). Starting with Npgsql 10, setting DataTypeName takes precedence over NpgsqlDbType. + +### JSON mutable DOM mappings (e.g. JsonNode, JsonArray...) now require EnableJsonTypes on NpgsqlSlimDataSourceBuilder + +NativeAOT applications which use `NpgsqlSlimDataSourceBuilder` and make use of mutable JSON types (`JsonNode`, `JsonValue`...) now have to call `EnableJsonTypes()`. Previously, calling `EnableJsonDynamicTypes()` added these mappings.