🐍💻 Fix Npgsql “Bad Protocol Version” on macOS & .NET 6

If you’re building .NET 6 apps on macOS and connecting to PostgreSQL using Npgsql, you might encounter:

🚫 Bad Protocol Version errors

This usually means a mismatch between client and server expectations, but it can be resolved.

Perfect for developers wrestling with cross-platform database connections.

👉 Resolve the error here:
https://sslinsights.com/fix-npgsql-bad-protocol-version-macos-net6/

#dotnet6 #Npgsql #macOSDev #PostgreSQL #DevOps #Programming #ErrorFix #SSLInsights

Now gotten my Saturday article published. (As my search is picking up since I fixed it it's worth doing). So you can find a lot of articles I haven't publicised on X / LinkedIn on the site. This one is on a LONG term obsession about hierarchies in SQL server.
This article presents 5 ways to do it in EF with PostgreSQL.
Data Hierarchies: Managing Hierarchical Data with EF Core and PostgreSQL (Part 1)
https://www.mostlylucid.net/blog/efcore-hierarchical-data

#efcore #npgsql #csharp #ef

Data Hierarchies: Managing Hierarchical Data with EF Core and PostgreSQL (Part 1) (English)

Introduction Hierarchical data is everywhere in software development: threaded comments, organisational charts, file systems, product categories, and forum...

mostlylucid
Hi #dotNET folks,
yesterday, Roji released #Npgsql 10.0 the .NET data provider for #PostgreSQL that targets .NET 10.0 and #NpgsqlEFCorePG the corresponding #EFCore provider.
Please check out the release notes at https://www.npgsql.org/doc/release-notes/10.0.html and https://www.npgsql.org/efcore/release-notes/10.0.html for new features and breaking changes.
Npgsql 10.0 Release Notes | Npgsql Documentation

Heute erstmal #VisualStudio 2026 und die neue #Rider und #Resharper Version installiert. Dabei einen Crash beim ersten Start von Rider gehabt und ihn an #Jetbrains gemeldet. Danach dann unser Projekt auf .NET 10 umgestellt und dabei gemerkt, dass noch das #Npgsql #NuGet Package fehlt, um komplett umzustellen. Also noch etwas warten... ansonsten hat alles funktioniert 😄!
Resolving Npgsql FileNotFoundException in .NET: A Guide to Database Connectivity
Resolve Npgsql FileNotFoundException errors in your database connectivity. Learn common causes & practical solutions for smooth PostgreSQL interactions. #DatabaseConnectivity #Troubleshooting #Npgsql #FileNotFoundException #PostgreSQL #JDBC
https://tech-champion.com/database/db2luw/resolving-npgsql-filenotfoundexception-in-net-a-guide-to-database-connectivity/

TIL you can't use both dataSourceBuilder.MapComposite<T> and NpgsqlConnection.GlobalTypeMapper.MapComposite<T> at the same time in #npgsql
docs: https://www.npgsql.org/doc/types/enums_and_composites.html?tabs=datasource

When you add mapping for composite type in GlobalTypeMapper - it replace datasource `UserTypeMapper` with global. Code here: https://github.com/npgsql/npgsql/blob/ab8e8db61617283603ac0350c1902222d710b92a/src/Npgsql/NpgsqlSlimDataSourceBuilder.cs#L423

PostgreSQL enums and composites | Npgsql Documentation

Hi #dotNET folks,
today, we released multiple patch versions of #Npgsql, the .NET data provider for #PostgreSQL that fix https://www.cve.org/CVERecord?id=CVE-2024-32655
Nino, Nikita and Roji went out of their way and backported the fix to all versions back to 4.x to make sure that any version that might still be in reasonable use today gets patched.
Please make sure to upgrade to the latest patch version of Npgsql as soon as possible.
Versions containing the fix are:
≥ 8.0.3
≥ 7.0.7
≥ 6.0.11
≥ 5.0.18
≥ 4.1.13
≥ 4.0.14
CVE Website

Experiment: Outbox for .NET as a separate thing! 🤩

👉 https://github.com/rebus-org/Freakout

At the moment it supports Microsoft SQL Server and PostgreSQL.

Could it maybe be useful?

#sqlserver #mssql #postgres #postgresql #npgsql

GitHub - rebus-org/Freakout: :outbox_tray: Just a general outbox thing

:outbox_tray: Just a general outbox thing. Contribute to rebus-org/Freakout development by creating an account on GitHub.

GitHub
Hi #dotNET developers,
in case you have already upgraded to #Npgsql 8.0 and are affected by a bug, you may be happy that Npgsql 8.0.1 has been released.
See https://github.com/npgsql/npgsql/milestone/110?closed=1 for the issues that have been closed in this release.
#NpgsqlEFCorePG the corresponding #EFCore provider has not been released yet but the existing release should be compatible with Npgsql 8.0.1
8.0.1 Milestone · npgsql/npgsql

Npgsql is the .NET data provider for PostgreSQL. Contribute to npgsql/npgsql development by creating an account on GitHub.

GitHub

@DO9XE ja, das hatten wir bei #Npgsql auch: https://github.com/npgsql/npgsql/issues/5308

Man fragt sich viele Jahre warum man sich die ganze Zeit die Mühe macht, die Endianness zu berücksichtigen, wo doch ohnehin alles little endian ist und man big endian mit den eigenen Mitteln überhaupt nicht testen kann und dann kommt plötzlich einer aus einem Loch gekrochen, der mit BE-Architektur arbeitet und meldet einen Bug.
Das wertet die ganze Arbeit im Nachhinein auf.

Decimal Values with Incorrect Byte Order on s390x Architecture · Issue #5308 · npgsql/npgsql

Issue Description: Decimal values retrieved from a PostgreSQL database exhibit incorrect byte order when the application runs on an s390x machine using .NET 6.0. On x64/x86 machines, the applicatio...

GitHub