Npgsql 10.0.0

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.

No packages depend on Npgsql.

Version Downloads Last updated
10.0.0 3 11/23/2025
10.0.0-rc.1 32 10/10/2025
9.0.4 35 10/10/2025
9.0.3 34 10/10/2025
9.0.2 30 10/10/2025
9.0.1 32 10/10/2025
8.0.8 32 10/10/2025
8.0.7 30 10/10/2025
8.0.6 30 10/10/2025
8.0.5 33 10/10/2025
8.0.4 28 10/10/2025
8.0.3 30 10/10/2025
8.0.2 31 10/10/2025
8.0.1 30 10/10/2025
8.0.0 28 10/10/2025
8.0.0-rc.2 20 10/10/2025
8.0.0-preview.4 23 10/10/2025
8.0.0-preview.3 31 10/10/2025
8.0.0-preview.2 30 10/10/2025
8.0.0-preview.1 28 10/10/2025
7.0.10 26 10/10/2025
7.0.9 28 10/10/2025
7.0.8 30 10/10/2025
7.0.7 35 10/10/2025
7.0.6 31 10/10/2025
7.0.4 28 10/10/2025
7.0.2 23 10/10/2025
7.0.1 32 10/10/2025
7.0.0 30 10/10/2025
7.0.0-rc.2 30 10/10/2025
7.0.0-rc.1 29 10/10/2025
7.0.0-preview.7 33 10/10/2025
7.0.0-preview.6 32 10/10/2025
7.0.0-preview.5 31 10/10/2025
7.0.0-preview.4 29 10/10/2025
7.0.0-preview.3 29 10/10/2025
7.0.0-preview.2 26 10/10/2025
7.0.0-preview.1 30 10/10/2025
6.0.13 30 10/10/2025
6.0.12 31 10/10/2025
6.0.11 32 10/10/2025
6.0.10 31 10/10/2025
6.0.9 24 10/10/2025
6.0.8 34 10/10/2025
6.0.7 22 10/10/2025
6.0.6 34 10/10/2025
6.0.5 31 10/10/2025
6.0.4 28 10/10/2025
6.0.3 34 10/10/2025
6.0.2 28 10/10/2025
6.0.1 31 10/10/2025
6.0.0 33 10/10/2025
6.0.0-rc.2 32 10/10/2025
6.0.0-rc.1 34 10/10/2025
6.0.0-preview7 27 10/10/2025
6.0.0-preview6 34 10/10/2025
6.0.0-preview5 30 10/10/2025
6.0.0-preview4 32 10/10/2025
6.0.0-preview3 31 10/10/2025
6.0.0-preview2 25 10/10/2025
5.0.18 26 10/10/2025
5.0.17 29 10/10/2025
5.0.16 28 10/10/2025
5.0.15 32 10/10/2025
5.0.14 26 10/10/2025
5.0.13 25 10/10/2025
5.0.12 28 10/10/2025
5.0.11 29 10/10/2025
5.0.10 32 10/10/2025
5.0.7 31 10/10/2025
5.0.5 26 10/10/2025
5.0.4 29 10/10/2025
5.0.3 31 10/10/2025
5.0.2 33 10/10/2025
5.0.1.1 30 10/10/2025
5.0.0 35 10/10/2025
4.1.14 34 10/10/2025
4.1.13 23 10/10/2025
4.1.12 32 10/10/2025
4.1.11 26 10/10/2025
4.1.10 27 10/10/2025
4.1.9 32 10/10/2025
4.1.8 31 10/10/2025
4.1.7 33 10/10/2025
4.1.6 27 10/10/2025
4.1.5 26 10/10/2025
4.1.4 26 10/10/2025
4.1.3.1 23 10/10/2025
4.1.3 31 10/10/2025
4.1.2 27 10/10/2025
4.1.1 26 10/10/2025
4.1.0 29 10/10/2025
4.0.17 23 10/10/2025
4.0.16 24 10/10/2025
4.0.14 36 10/10/2025
4.0.13 23 10/10/2025
4.0.12 30 10/10/2025
4.0.11 32 10/10/2025
4.0.10 22 10/10/2025
4.0.9 31 10/10/2025
4.0.8 31 10/10/2025
4.0.7 31 10/10/2025
4.0.6 30 10/10/2025
4.0.5 35 10/10/2025
4.0.4 24 10/10/2025
4.0.3 33 10/10/2025
4.0.2 25 10/10/2025
4.0.1 26 10/10/2025
4.0.0 28 10/10/2025
4.0.0-rc1 30 10/10/2025
4.0.0-preview2 29 10/10/2025
4.0.0-preview1 30 10/10/2025
3.2.7 34 10/10/2025
3.2.6 23 10/10/2025
3.2.5 40 10/10/2025
3.2.4.1 32 10/10/2025
3.2.4 30 10/10/2025
3.2.3 24 10/10/2025
3.2.2 27 10/10/2025
3.2.1 25 10/10/2025
3.2.0 35 10/10/2025
3.1.10 33 10/10/2025
3.1.9 28 10/10/2025
3.1.8 31 10/10/2025
3.1.7 29 10/10/2025
3.1.6 31 10/10/2025
3.1.5 31 10/10/2025
3.1.4 37 10/10/2025
3.1.3 29 10/10/2025
3.1.2 31 10/10/2025
3.1.1 32 10/10/2025
3.1.0 24 10/10/2025
3.0.8 38 10/10/2025
3.0.7 31 10/10/2025
3.0.6 28 10/10/2025
3.0.5 25 10/10/2025
3.0.4 34 10/10/2025
3.0.3 30 10/10/2025
3.0.2 27 10/10/2025
3.0.1 34 10/10/2025
3.0.0 26 10/10/2025
2.2.7 34 10/10/2025
2.2.6 32 10/10/2025
2.2.5 28 10/10/2025
2.2.4.3 30 10/10/2025
2.2.4.1 26 10/10/2025
2.2.3 33 10/10/2025
2.2.2 30 10/10/2025
2.2.1 28 10/10/2025
2.2.0 31 10/10/2025
2.1.3 33 10/10/2025
2.1.2 28 10/10/2025
2.1.1 28 10/10/2025
2.1.0 26 10/10/2025
2.0.14.3 30 10/10/2025
2.0.12.1 36 10/10/2025
2.0.11 33 10/10/2025