Npgsql

.NET Data Provider for PostgreSQL

About Npgsql

Npgsql is the .NET data provider for PostgreSQL. It allows any program developed for .NET framework to access a PostgreSQL database server. It is implemented in 100% C# code. PostgreSQL versions since 9.0 are officially supported, others may work. Read more...

Latest News

  • Npgsql Entity Framework 6 Provider 3.1.0

    Npgsql’s Entity Framework 6 (and 5) provider version 3.1.0 has been released and is available on nuget.org. This allows use of the newly-released Npgsql 3.1.0 with Entity Framework 6/5.

    Starting now, EF6/5 provider releases will be decoupled from Npgsql itself; up to now every time a version bump occured on Npgsql, an EF6/5 provider with the same version released. From now on each project will follow its own versioning.

  • Npgsql 3.1.2

    Npgsql 3.1.2 has been released and is available on nuget.org.

    This release fixes a major bug where the read timeout was set incorrectly, resulting in incorrect timeout exceptions.

    Also, async calls weren’t really executed asynchronously when using SSL (TlsClientStream specifically), this has been resolved and async calls will be truly async.

    All users of 3.1.x should upgrade immediately.

  • Npgsql 3.1.1

    Npgsql 3.1.1 has been released and is available on nuget.org.

    This releases fixes some minor bugs and removes an embarrassing Console.WriteLine that somehow made it into the final release.

    It also implements the new CoreCLR data reader schema API (https://github.com/dotnet/corefx/issues/5915), a better way to discover information about columns you select. It’s been made available in .NET Framework as well.

    The complete list of issues is here.

  • Npgsql 3.1.0 and Entity Framework Core rc2 provider are out

    Npgsql 3.1.0 has been released and is available on nuget.org.

    This version represents 9 months of work since the release of 3.0.0, and is a significant release touching many areas of Npgsql. This version hasn’t received an extensive beta testing period and should be used with care, it’s recommended to wait for 3.1.1 for critical applications. It includes some breakage documented in the migration notes.

    In addition, with Microsoft’s release of rc2 Npgsql’s Entity Framework Core has been released as well - look for Npgsql.EntityFrameworkCore.PostgreSQL 1.0.0-rc2-release1 on nuget.org. For more details see the documentation.

    Npgsql release highlights are below, the documentation isn’t yet up to date on everything. Please try both Npgsql and the EFCore provider and let you know how they works for you!

    • CoreCLR support (rc2, netstandard13). Some known issues will be fixed for 3.1.0 but things should already work pretty well.
    • Fixed multi-statement commands issues (#641). You can now send commands with statements that depend on each other, such as “CREATE TABLE X …; INSERT INTO X…”
    • The connection pool has been rewritten from scratch and many previous performance issues should be gone (#726).
    • NpgsqlConnection’s OpenAsync() is now truly async, (#379). and Open() is now fully sync (#709).
    • Native binary support for PostGIS 2D types, thanks @rossini-t (#665).
    • Composite type support (#441), see the PostgreSQL docs and the the Npgsql docs.
    • Exception behavior has been improved and made more compatible with other ADO.NET providers. It’s now easier to catch exceptions Npgsql throws (#897).
    • When mapping enum or composite types, you can now control how field names are mapped to PostgreSQL names (#859).
    • Continued efforts from 3.0 to reduce heap allocations - Npgsql 3.1 should place even less pressure on the garbage collector.

    The complete list of issues is here.

    Note that the Entity Framework 6/5 providers, the GAC installer and the DDEX provider will be released later.

  • Npgsql 3.1.0 beta1 is out

    The first beta version of Npgsql 3.1.0 is out and available on nuget.org.

    This version represents 9 months of work since the release of 3.0.0, and is a significant release touching many areas of Npgsql. It includes some breakage documented in the migration notes and should be tested carefully.

    Please try it out and let you know how it works for you! Release highlights are below, the documentation isn’t yet up to date on everything.

    • CoreCLR support (netstandard13). Some known issues will be fixed for 3.1.0 but things should already work pretty well.
    • Fixed multi-statement commands issues (#641). You can now send commands with statements that depend on each other, such as “CREATE TABLE X …; INSERT INTO X…”
    • The connection pool has been rewritten from scratch and many previous performance issues should be gone (#726).
    • NpgsqlConnection’s OpenAsync() is now truly async, (#379). and Open() is now fully sync (#709).
    • Native binary support for PostGIS 2D types, thanks @rossini-t (#665).
    • Composite type support (document)
    • Exception behavior has been improved and made more compatible with other ADO.NET providers. It’s now easier to catch exceptions Npgsql throws (#897).
    • When mapping enum or composite types, you can now control how field names are mapped to PostgreSQL names (#859).
    • Continued efforts from 3.0 to reduce heap allocations - Npgsql 3.1 should place even less pressure on the garbage collector.

    The complete list of issues is here.

Click here for older announcements