Skip to content
Open
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
Add explicit release notes URL when they are mentioned in error messages
It's not hard to find the Npgsql release notes but it's even better if the exact URL is just one click away because it's included in the error messages.
  • Loading branch information
0xced committed Mar 21, 2026
commit 6a9c9603be3ecdaf9b5ce7b6c5a1bc1870505dfc
6 changes: 3 additions & 3 deletions src/Npgsql/NpgsqlConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ internal NpgsqlDataSource NpgsqlDataSource
/// The global type mapper, which contains defaults used by all new connections.
/// Modify mappings on this mapper to affect your entire application.
/// </summary>
[Obsolete("Global-level type mapping has been replaced with data source mapping, see the 7.0 release notes.")]
[Obsolete("Global-level type mapping has been replaced with data source mapping, see the 7.0 release notes at https://www.npgsql.org/doc/release-notes/7.0.html for more information.")]
public static INpgsqlTypeMapper GlobalTypeMapper => TypeMapping.GlobalTypeMapper.Instance;

/// <summary>
/// Connection-level type mapping is no longer supported. See the 7.0 release notes for configuring type mapping on NpgsqlDataSource.
/// Connection-level type mapping is no longer supported. See the 7.0 release notes at https://www.npgsql.org/doc/release-notes/7.0.html for configuring type mapping on NpgsqlDataSource.
/// </summary>
[Obsolete("Connection-level type mapping is no longer supported. See the 7.0 release notes for configuring type mapping on NpgsqlDataSource.", true)]
[Obsolete("Connection-level type mapping is no longer supported. See the 7.0 release notes at https://www.npgsql.org/doc/release-notes/7.0.html for configuring type mapping on NpgsqlDataSource.", true)]
public INpgsqlTypeMapper TypeMapper
=> throw new NotSupportedException();

Expand Down
4 changes: 2 additions & 2 deletions src/Npgsql/NpgsqlConnectionStringBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ public ArrayNullabilityMode ArrayNullabilityMode
[Description("Load table composite type definitions, and not just free-standing composite types.")]
[DisplayName("Load Table Composites")]
[NpgsqlConnectionStringProperty]
[Obsolete("Specifying type loading options through the connection string is obsolete, use the DataSource builder instead. See the 9.0 release notes for more information.")]
[Obsolete("Specifying type loading options through the connection string is obsolete, use the DataSource builder instead. See the 9.0 release notes at https://www.npgsql.org/doc/release-notes/9.0.html for more information.")]
public bool LoadTableComposites
{
get => _loadTableComposites;
Expand All @@ -1393,7 +1393,7 @@ public bool LoadTableComposites
[Description("A compatibility mode for special PostgreSQL server types.")]
[DisplayName("Server Compatibility Mode")]
[NpgsqlConnectionStringProperty]
[Obsolete("Specifying type loading options through the connection string is obsolete, use the DataSource builder instead. See the 9.0 release notes for more information.")]
[Obsolete("Specifying type loading options through the connection string is obsolete, use the DataSource builder instead. See the 9.0 release notes at https://www.npgsql.org/doc/release-notes/9.0.html for more information.")]
public ServerCompatibilityMode ServerCompatibilityMode
{
// Physical replication connections don't allow regular queries, so we can't load types from PG
Expand Down
10 changes: 5 additions & 5 deletions src/Npgsql/Properties/NpgsqlStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Npgsql/Properties/NpgsqlStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<value>ValidationRootCertificateCallback cannot be used in conjunction with SslClientAuthenticationOptionsCallback overwriting RemoteCertificateValidationCallback; when registering a validation callback, perform whatever validation you require in that callback.</value>
</data>
<data name="RecordsNotEnabled" xml:space="preserve">
<value>Could not read a PostgreSQL record. If you're attempting to read a record as a .NET tuple, call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/basic.html and the 8.0 release notes for more details). If you're reading a record as a .NET object array using NpgsqlSlimDataSourceBuilder, call '{2}'.
<value>Could not read a PostgreSQL record. If you're attempting to read a record as a .NET tuple, call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/basic.html and the 8.0 release notes at https://www.npgsql.org/doc/release-notes/8.0.html for more details). If you're reading a record as a .NET object array using NpgsqlSlimDataSourceBuilder, call '{2}'.
</value>
Comment thread
0xced marked this conversation as resolved.
</data>
<data name="FullTextSearchNotEnabled" xml:space="preserve">
Expand Down Expand Up @@ -98,14 +98,14 @@
<value>Cannot write DateTime with Kind=UTC to PostgreSQL type '{0}', consider using '{1}'. Note that it's not possible to mix DateTimes with different Kinds in an array, range, or multirange.</value>
</data>
<data name="DynamicJsonNotEnabled" xml:space="preserve">
<value>Type '{0}' required dynamic JSON serialization, which requires an explicit opt-in; call '{1}' on '{2}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/json.html and the 8.0 release notes for more details). Alternatively, if you meant to use Newtonsoft JSON.NET instead of System.Text.Json, call UseJsonNet() instead.
<value>Type '{0}' required dynamic JSON serialization, which requires an explicit opt-in; call '{1}' on '{2}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/json.html and the 8.0 release notes at https://www.npgsql.org/doc/release-notes/8.0.html for more details). Alternatively, if you meant to use Newtonsoft JSON.NET instead of System.Text.Json, call UseJsonNet() instead.
</value>
Comment thread
0xced marked this conversation as resolved.
</data>
<data name="UnmappedEnumsNotEnabled" xml:space="preserve">
<value>Reading and writing unmapped enums requires an explicit opt-in; call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/enums_and_composites.html and the 8.0 release notes for more details).</value>
<value>Reading and writing unmapped enums requires an explicit opt-in; call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/enums_and_composites.html and the 8.0 release notes at https://www.npgsql.org/doc/release-notes/8.0.html for more details).</value>
</data>
<data name="UnmappedRangesNotEnabled" xml:space="preserve">
<value>Reading and writing unmapped ranges and multiranges requires an explicit opt-in; call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/ranges.html and the 8.0 release notes for more details).</value>
<value>Reading and writing unmapped ranges and multiranges requires an explicit opt-in; call '{0}' on '{1}' or NpgsqlConnection.GlobalTypeMapper (see https://www.npgsql.org/doc/types/ranges.html and the 8.0 release notes at https://www.npgsql.org/doc/release-notes/8.0.html for more details).</value>
</data>
<data name="SslClientAuthenticationOptionsCallbackWithOtherCallbacksNotSupported" xml:space="preserve">
<value>SslClientAuthenticationOptionsCallback is not supported together with UserCertificateValidationCallback and ClientCertificatesCallback</value>
Expand Down
Loading