Npgsql 9.0.1

Prefix Reserved
dotnet add package Npgsql --version 9.0.1                
NuGet\Install-Package Npgsql -Version 9.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Npgsql" Version="9.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Npgsql --version 9.0.1                
#r "nuget: Npgsql, 9.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Npgsql as a Cake Addin
#addin nuget:?package=Npgsql&version=9.0.1

// Install Npgsql as a Cake Tool
#tool nuget:?package=Npgsql&version=9.0.1                

Npgsql is the open source .NET data provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.

Quickstart

Here's a basic code snippet to get you started:

var connString = "Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase";

await using var conn = new NpgsqlConnection(connString);
await conn.OpenAsync();

// Insert some data
await using (var cmd = new NpgsqlCommand("INSERT INTO data (some_field) VALUES (@p)", conn))
{
    cmd.Parameters.AddWithValue("p", "Hello world");
    await cmd.ExecuteNonQueryAsync();
}

// Retrieve all rows
await using (var cmd = new NpgsqlCommand("SELECT some_field FROM data", conn))
await using (var reader = await cmd.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
    Console.WriteLine(reader.GetString(0));
}

Key features

  • High-performance PostgreSQL driver. Regularly figures in the top contenders on the TechEmpower Web Framework Benchmarks.
  • Full support of most PostgreSQL types, including advanced ones such as arrays, enums, ranges, multiranges, composites, JSON, PostGIS and others.
  • Highly-efficient bulk import/export API.
  • Failover, load balancing and general multi-host support.
  • Great integration with Entity Framework Core via Npgsql.EntityFrameworkCore.PostgreSQL.

For the full documentation, please visit the Npgsql website.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.7K)

Showing the top 5 NuGet packages that depend on Npgsql:

Package Downloads
Npgsql.EntityFrameworkCore.PostgreSQL

PostgreSQL/Npgsql provider for Entity Framework Core.

AspNetCore.HealthChecks.NpgSql

HealthChecks.NpgSql is a health check for Postgress Sql.

Hangfire.PostgreSql

PostgreSql storage implementation for Hangfire (background job system for ASP.NET and aspnet core applications).

Npgsql.Json.NET

Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.

Npgsql.EntityFrameworkCore.PostgreSQL.Design

PostgreSQL/Npgsql provider for Entity Framework Core.

GitHub repositories (253)

Showing the top 5 popular GitHub repositories that depend on Npgsql:

Repository Stars
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
DapperLib/Dapper
Dapper - a simple object mapper for .Net
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
dotnet/orleans
Cloud Native application framework for .NET
Version Downloads Last updated
9.0.1 265,588 11/19/2024
8.0.6 319,764 11/18/2024
8.0.5 2,608,227 10/13/2024
8.0.4 2,822,027 9/10/2024
8.0.3 21,644,806 5/9/2024
8.0.2 10,692,218 2/10/2024 8.0.2 has at least one vulnerability with high severity.
8.0.1 2,888,703 12/4/2023 8.0.1 has at least one vulnerability with high severity.
8.0.0 11,086,462 11/21/2023 8.0.0 has at least one vulnerability with high severity.
8.0.0-rc.2 207,021 10/11/2023
8.0.0-preview.4 303,024 5/17/2023
8.0.0-preview.3 57,612 4/24/2023
8.0.0-preview.2 52,919 3/20/2023
8.0.0-preview.1 76,273 3/3/2023
7.0.9 8,314 11/18/2024
7.0.8 129,940 9/10/2024
7.0.7 2,459,152 5/9/2024
7.0.6 11,994,233 9/14/2023 7.0.6 has at least one vulnerability with high severity.
7.0.4 18,401,129 4/24/2023 7.0.4 has at least one vulnerability with high severity.
7.0.2 10,597,127 2/15/2023 7.0.2 has at least one vulnerability with high severity.
7.0.1 7,585,900 12/17/2022 7.0.1 has at least one vulnerability with high severity.
7.0.0 5,972,274 11/9/2022 7.0.0 has at least one vulnerability with high severity.
7.0.0-rc.2 75,933 10/11/2022
7.0.0-rc.1 37,849 9/16/2022
7.0.0-preview.7 40,458 8/9/2022
7.0.0-preview.6 36,339 7/13/2022
7.0.0-preview.5 18,489 6/19/2022
7.0.0-preview.4 40,987 5/11/2022
7.0.0-preview.3 43,826 4/19/2022
7.0.0-preview.2 43,829 3/16/2022
7.0.0-preview.1 4,901,545 2/17/2022
6.0.13 14,322 11/18/2024
6.0.12 115,775 9/10/2024
6.0.11 3,709,327 5/9/2024
6.0.10 2,475,709 9/14/2023 6.0.10 has at least one vulnerability with high severity.
6.0.9 2,993,739 2/15/2023 6.0.9 has at least one vulnerability with high severity.
6.0.8 8,856,760 12/17/2022 6.0.8 has at least one vulnerability with high severity.
6.0.7 13,900,319 9/16/2022 6.0.7 has at least one vulnerability with high severity.
6.0.6 11,300,230 8/4/2022 6.0.6 has at least one vulnerability with high severity.
6.0.5 8,342,844 6/19/2022 6.0.5 has at least one vulnerability with high severity.
6.0.4 11,394,965 4/19/2022 6.0.4 has at least one vulnerability with high severity.
6.0.3 14,086,990 1/27/2022 6.0.3 has at least one vulnerability with high severity.
6.0.2 5,390,855 12/20/2021 6.0.2 has at least one vulnerability with high severity.
6.0.1 8,329,580 12/3/2021 6.0.1 has at least one vulnerability with high severity.
6.0.0 22,582,771 11/9/2021 6.0.0 has at least one vulnerability with high severity.
6.0.0-rc.2 143,708 10/14/2021
6.0.0-rc.1 131,562 9/24/2021
6.0.0-preview7 43,602 8/16/2021
6.0.0-preview6 11,502 7/31/2021
6.0.0-preview5 63,787 7/1/2021
6.0.0-preview4 60,706 5/27/2021
6.0.0-preview3 63,694 4/15/2021
6.0.0-preview2 69,495 3/11/2021
5.0.18 821,454 5/9/2024
5.0.17 148,839 9/14/2023 5.0.17 has at least one vulnerability with high severity.
5.0.16 304,714 2/15/2023 5.0.16 has at least one vulnerability with high severity.
5.0.15 477,248 9/16/2022 5.0.15 has at least one vulnerability with high severity.
5.0.14 363,682 6/19/2022 5.0.14 has at least one vulnerability with high severity.
5.0.13 441,611 4/26/2022 5.0.13 has at least one vulnerability with high severity.
5.0.12 858,420 2/1/2022 5.0.12 has at least one vulnerability with high severity.
5.0.11 2,310,018 11/12/2021 5.0.11 has at least one vulnerability with high severity.
5.0.10 10,320,150 9/15/2021 5.0.10 has at least one vulnerability with high severity.
5.0.7 14,047,756 6/13/2021 5.0.7 has at least one vulnerability with high severity.
5.0.5 5,028,265 5/11/2021 5.0.5 has at least one vulnerability with high severity.
5.0.4 7,977,588 3/25/2021 5.0.4 has at least one vulnerability with high severity.
5.0.3 6,629,037 1/26/2021 5.0.3 has at least one vulnerability with high severity.
5.0.2 4,560,060 1/19/2021 5.0.2 has at least one vulnerability with high severity.
5.0.1.1 2,755,083 12/12/2020 5.0.1.1 has at least one vulnerability with high severity.
5.0.0 4,829,092 11/15/2020 5.0.0 has at least one vulnerability with high severity.
4.1.14 194,519 5/18/2024
4.1.13 468,991 5/9/2024
4.1.12 861,519 6/19/2022 4.1.12 has at least one vulnerability with high severity.
4.1.11 95,473 4/26/2022 4.1.11 has at least one vulnerability with high severity.
4.1.10 757,723 11/12/2021 4.1.10 has at least one vulnerability with high severity.
4.1.9 3,369,808 4/6/2021 4.1.9 has at least one vulnerability with high severity.
4.1.8 3,201,985 1/21/2021 4.1.8 has at least one vulnerability with high severity.
4.1.7 466,719 12/12/2020 4.1.7 has at least one vulnerability with high severity.
4.1.6 1,156,560 11/15/2020 4.1.6 has at least one vulnerability with high severity.
4.1.5 5,446,834 9/28/2020 4.1.5 has at least one vulnerability with high severity.
4.1.4 4,205,287 7/19/2020 4.1.4 has at least one vulnerability with high severity.
4.1.3.1 20,278,459 2/20/2020 4.1.3.1 has at least one vulnerability with high severity.
4.1.3 7,984,303 1/31/2020 4.1.3 has at least one vulnerability with high severity.
4.1.2 5,662,387 11/14/2019 4.1.2 has at least one vulnerability with high severity.
4.1.1 4,280,161 10/2/2019 4.1.1 has at least one vulnerability with high severity.
4.1.0 692,338 9/26/2019 4.1.0 has at least one vulnerability with high severity.
4.0.17 32,948 6/10/2024
4.0.16 38,734 5/18/2024
4.0.14 44,487 5/9/2024
4.0.13 129,318 6/19/2022 4.0.13 has at least one vulnerability with high severity.
4.0.12 104,968 5/16/2021 4.0.12 has at least one vulnerability with high severity.
4.0.11 667,464 7/19/2020 4.0.11 has at least one vulnerability with high severity.
4.0.10 5,943,518 9/9/2019 4.0.10 has at least one vulnerability with high severity.
4.0.9 1,125,285 8/14/2019 4.0.9 has at least one vulnerability with high severity.
4.0.8 946,762 7/18/2019 4.0.8 has at least one vulnerability with high severity.
4.0.7 7,129,692 5/21/2019 4.0.7 has at least one vulnerability with high severity.
4.0.6 3,544,787 4/11/2019 4.0.6 has at least one vulnerability with high severity.
4.0.5 1,554,864 3/3/2019 4.0.5 has at least one vulnerability with high severity.
4.0.4 7,991,273 12/6/2018 4.0.4 has at least one vulnerability with high severity.
4.0.3 5,838,716 9/8/2018 4.0.3 has at least one vulnerability with high severity.
4.0.2 3,475,870 7/8/2018 4.0.2 has at least one vulnerability with high severity.
4.0.1 758,952 7/1/2018 4.0.1 has at least one vulnerability with high severity.
4.0.0 1,824,882 5/30/2018 4.0.0 has at least one vulnerability with high severity.
4.0.0-rc1 93,656 5/8/2018 4.0.0-rc1 has at least one vulnerability with high severity.
4.0.0-preview2 109,065 4/11/2018 4.0.0-preview2 has at least one vulnerability with high severity.
4.0.0-preview1 18,573 3/19/2018 4.0.0-preview1 has at least one vulnerability with high severity.
3.2.7 7,958,972 2/27/2018 3.2.7 has at least one vulnerability with high severity.
3.2.6 5,739,731 12/3/2017 3.2.6 has at least one vulnerability with high severity.
3.2.5 7,102,945 7/25/2017 3.2.5 has at least one vulnerability with high severity.
3.2.4.1 241,336 6/22/2017 3.2.4.1 has at least one vulnerability with high severity.
3.2.4 26,741 6/13/2017 3.2.4 has at least one vulnerability with high severity.
3.2.3 65,944 6/1/2017 3.2.3 has at least one vulnerability with high severity.
3.2.2 1,646,641 3/21/2017 3.2.2 has at least one vulnerability with high severity.
3.2.1 122,571 2/14/2017 3.2.1 has at least one vulnerability with high severity.
3.2.0 73,620 1/27/2017 3.2.0 has at least one vulnerability with high severity.
3.1.10 87,856 2/14/2017 3.1.10 has at least one vulnerability with high severity.
3.1.9 7,485,100 11/20/2016 3.1.9 has at least one vulnerability with high severity.
3.1.8 410,227 9/24/2016 3.1.8 has at least one vulnerability with high severity.
3.1.7 519,995 8/6/2016 3.1.7 has at least one vulnerability with high severity.
3.1.6 131,603 7/12/2016 3.1.6 has at least one vulnerability with high severity.
3.1.5 329,165 6/28/2016 3.1.5 has at least one vulnerability with high severity.
3.1.4 79,679 6/16/2016 3.1.4 has at least one vulnerability with high severity.
3.1.3 280,020 5/30/2016 3.1.3 has at least one vulnerability with high severity.
3.1.2 150,708 5/22/2016 3.1.2 has at least one vulnerability with high severity.
3.1.1 232,323 5/19/2016 3.1.1 has at least one vulnerability with high severity.
3.1.0 169,495 5/16/2016 3.1.0 has at least one vulnerability with high severity.
3.0.8 61,228 6/16/2016 3.0.8 has at least one vulnerability with high severity.
3.0.7 36,817 5/3/2016 3.0.7 has at least one vulnerability with high severity.
3.0.6 9,656 5/1/2016 3.0.6 has at least one vulnerability with high severity.
3.0.5 287,074 1/1/2016 3.0.5 has at least one vulnerability with high severity.
3.0.4 35,974 12/6/2015 3.0.4 has at least one vulnerability with high severity.
3.0.3 70,672 9/27/2015 3.0.3 has at least one vulnerability with high severity.
3.0.2 46,061 9/4/2015 3.0.2 has at least one vulnerability with high severity.
3.0.1 31,991 8/18/2015 3.0.1 has at least one vulnerability with high severity.
3.0.0 49,553 8/7/2015 3.0.0 has at least one vulnerability with high severity.
2.2.7 446,510 9/18/2015 2.2.7 has at least one vulnerability with high severity.
2.2.6 56,535 8/27/2015 2.2.6 has at least one vulnerability with high severity.
2.2.5 356,196 3/11/2015 2.2.5 has at least one vulnerability with high severity.
2.2.4.3 52,205 2/6/2015 2.2.4.3 has at least one vulnerability with high severity.
2.2.4.1 18,508 2/3/2015 2.2.4.1 has at least one vulnerability with high severity.
2.2.3 391,186 11/26/2014 2.2.3 has at least one vulnerability with high severity.
2.2.2 41,380 11/1/2014 2.2.2 has at least one vulnerability with high severity.
2.2.1 59,741 9/24/2014 2.2.1 has at least one vulnerability with high severity.
2.2.0 30,560 9/1/2014 2.2.0 has at least one vulnerability with high severity.
2.1.3 79,244 4/9/2014 2.1.3 has at least one vulnerability with high severity.
2.1.2 17,073 3/28/2014 2.1.2 has at least one vulnerability with high severity.
2.1.1 16,905 3/21/2014 2.1.1 has at least one vulnerability with high severity.
2.1.0 32,602 3/19/2014 2.1.0 has at least one vulnerability with high severity.
2.0.14.3 92,403 12/21/2013 2.0.14.3 has at least one vulnerability with high severity.
2.0.12.1 75,426 12/17/2012 2.0.12.1 has at least one vulnerability with high severity.
2.0.11 255,606 2/6/2011 2.0.11 has at least one vulnerability with high severity.