.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 2.2.6 is out

    Npgsql 2.2.6 is out and available at

    This is a maintenance release for the 2.x branch which fixes some bugs, including a potential SQL injection issue when using citext or other exotic types (see #734). Note that this bug doesn’t affect the 3.x branch and there’s no need to upgrade.

    The 2.x is considered obsolete and will only be maintained to fix critical bugs. You are encouraged to (cautiously!) upgrade to 3.x as soon as possible.

    The full list of changes is available here.

  • Npgsql 3.0.1 is out

    Npgsql 3.0.1 is out and available at

    This release fixes some bugs reported since 3.0.0 came out, and adds some trivial missing features. Is is recommended that everyone upgrade.

    The full list of changes is available here.

  • Npgsql 3.0.0 is out

    Npgsql 3.0.0 is out and available at

    Npgsql 3.0.0 is a near-total rewrite, and represents over a year’s effort.

    • Switch to 100% binary communication with PostgreSQL #447. This has the following advantages:
      • Significant speed increase for some types
      • Improves general stability and removed dependency user-defined parameters such as DateStyle, extra_float_digits, lc_monetary etc. (see #514, #324, #163, etc.)
      • More consistent behavior between simple and prepared statements
      • Simplified codebase (we previously supported both text and binary codecs for most types)
    • True async support for NpgsqlReader for better scalability. This implements the new .NET 4.5 ADO.NET async methods, except for the async connection methods (these are a major goal for 3.1, see #379).
    • Reworked type handing that greatly reduces memory churn. Except your application to allocate and release much less memory than before.
    • New high-performance import/export API that exposes PostgreSQL COPY. See the docs for more details.
    • Much better support for PostgreSQL asynchronous operations, such as LISTEN/NOTIFY. See the docs for more details.

    There are many other changes, see here to get an idea.

    Note that Npgsql 3.0 is not a simple drop-in replacement for 2.2: there are some breaking changes involved. Please consult the migration guide and test extensively before deploying to production.

    Major goals for Npgsql 3.1 includes:

    • Complete async support for connections (#379)
    • Fully implement the Entity Framework 7 provider (already in progress, #279)
    • Support .NET Core (#471)
    • Full, native PostGIS support (#529)

    Please try it out and let us know immediately of any issues!

  • Npgsql 3.0.0-rc1 is out

    Npgsql 3.0.0-rc1 is out and available at

    This release contains mainly fixes for bugs reported since 3.0.0-beta1. The full list is available here.

    If no new bugs are reported, I hope to publish 3.0.0 in about two weeks.

  • New website!

    Npgsql has a new website!

    The new site includes substantial new documentation for the upcoming 3.0 release (currently in beta), but watch out, it’s still work in progress.

Click here for older announcements