Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions conceptual/EFCore.PG/release-notes/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
10 changes: 10 additions & 0 deletions conceptual/Npgsql/release-notes/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.