Npgsql 8.0.8
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.
Related packages
- The Entity Framework Core provider that works with this provider is Npgsql.EntityFrameworkCore.PostgreSQL.
- Spatial plugin to work with PostgreSQL PostGIS: Npgsql.NetTopologySuite
- NodaTime plugin to use better date/time types with PostgreSQL: Npgsql.NodaTime
- OpenTelemetry support can be set up with Npgsql.OpenTelemetry
Showing the top 20 packages that depend on Npgsql.
Packages | Downloads |
---|---|
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
82 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
83 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
99 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
113 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
135 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
157 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
172 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
194 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
303 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
329 |
Npgsql.EntityFrameworkCore.PostgreSQL
PostgreSQL/Npgsql provider for Entity Framework Core.
|
345 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
82 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
84 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
92 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
118 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
179 |
Npgsql.Json.NET
Json.NET plugin for Npgsql, allowing transparent serialization/deserialization of JSON objects directly to and from the database.
|
208 |
Serilog.Sinks.PostgreSQL
Serilog sink for writing to PostgreSQL table
|
600 |
.NET 6.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
.NET Standard 2.1
- System.Threading.Channels (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
.NET Standard 2.0
- System.Text.Json (>= 8.0.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Threading.Channels (>= 8.0.0)
- System.Collections.Immutable (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Diagnostics.DiagnosticSource (>= 8.0.0)
.NET 8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
.NET 7.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
Version | Downloads | Last updated |
---|---|---|
10.0.0-rc.1 | 8 | 10/06/2025 |
9.0.4 | 10 | 10/06/2025 |
9.0.3 | 157 | 03/27/2025 |
9.0.2 | 54 | 12/07/2024 |
9.0.1 | 53 | 11/19/2024 |
9.0.0 | 51 | 11/19/2024 |
8.0.8 | 6 | 10/06/2025 |
8.0.7 | 43 | 04/02/2025 |
8.0.6 | 41 | 11/23/2024 |
8.0.5 | 66 | 10/21/2024 |
8.0.4 | 50 | 10/07/2024 |
8.0.3 | 102 | 06/27/2024 |
8.0.2 | 67 | 07/22/2024 |
8.0.1 | 83 | 02/04/2024 |
8.0.0 | 153 | 02/04/2024 |
8.0.0-rc.2 | 62 | 07/22/2024 |
8.0.0-preview.4 | 67 | 07/22/2024 |
8.0.0-preview.3 | 66 | 07/22/2024 |
8.0.0-preview.2 | 76 | 07/22/2024 |
8.0.0-preview.1 | 66 | 07/22/2024 |
7.0.10 | 48 | 04/02/2025 |
7.0.9 | 51 | 11/19/2024 |
7.0.8 | 47 | 10/08/2024 |
7.0.7 | 68 | 07/22/2024 |
7.0.6 | 72 | 07/22/2024 |
7.0.4 | 82 | 07/22/2024 |
7.0.2 | 130 | 02/04/2024 |
7.0.1 | 69 | 07/22/2024 |
7.0.0 | 84 | 02/04/2024 |
7.0.0-rc.2 | 72 | 07/22/2024 |
7.0.0-rc.1 | 58 | 07/22/2024 |
7.0.0-preview.7 | 70 | 07/22/2024 |
7.0.0-preview.6 | 73 | 07/22/2024 |
7.0.0-preview.5 | 73 | 07/22/2024 |
7.0.0-preview.4 | 73 | 07/22/2024 |
7.0.0-preview.3 | 68 | 07/22/2024 |
7.0.0-preview.2 | 66 | 07/22/2024 |
7.0.0-preview.1 | 63 | 07/22/2024 |
6.0.13 | 41 | 11/19/2024 |
6.0.12 | 55 | 10/08/2024 |
6.0.11 | 69 | 07/22/2024 |
6.0.10 | 66 | 07/22/2024 |
6.0.9 | 67 | 07/22/2024 |
6.0.8 | 65 | 07/22/2024 |
6.0.7 | 75 | 07/22/2024 |
6.0.6 | 76 | 07/22/2024 |
6.0.5 | 74 | 07/22/2024 |
6.0.4 | 98 | 02/09/2024 |
6.0.3 | 102 | 02/04/2024 |
6.0.2 | 75 | 07/22/2024 |
6.0.1 | 69 | 07/22/2024 |
6.0.0 | 81 | 07/22/2024 |
6.0.0-rc.2 | 75 | 07/22/2024 |
6.0.0-rc.1 | 62 | 07/22/2024 |
6.0.0-preview7 | 84 | 07/22/2024 |
6.0.0-preview6 | 66 | 07/22/2024 |
6.0.0-preview5 | 70 | 07/22/2024 |
6.0.0-preview4 | 67 | 07/22/2024 |
6.0.0-preview3 | 71 | 07/22/2024 |
6.0.0-preview2 | 76 | 07/22/2024 |
5.0.18 | 78 | 07/22/2024 |
5.0.17 | 82 | 07/22/2024 |
5.0.16 | 78 | 07/22/2024 |
5.0.15 | 77 | 07/22/2024 |
5.0.14 | 79 | 07/22/2024 |
5.0.13 | 81 | 07/20/2024 |
5.0.12 | 70 | 07/22/2024 |
5.0.11 | 68 | 07/22/2024 |
5.0.10 | 65 | 07/22/2024 |
5.0.7 | 78 | 07/21/2024 |
5.0.5 | 205 | 02/04/2024 |
5.0.4 | 75 | 07/22/2024 |
5.0.3 | 72 | 07/22/2024 |
5.0.2 | 80 | 07/22/2024 |
5.0.1.1 | 64 | 07/22/2024 |
5.0.0 | 67 | 07/22/2024 |
4.1.14 | 70 | 07/22/2024 |
4.1.13 | 83 | 07/22/2024 |
4.1.12 | 71 | 07/22/2024 |
4.1.11 | 79 | 07/22/2024 |
4.1.10 | 78 | 07/21/2024 |
4.1.9 | 68 | 07/22/2024 |
4.1.8 | 65 | 07/22/2024 |
4.1.7 | 68 | 07/22/2024 |
4.1.6 | 82 | 07/22/2024 |
4.1.5 | 72 | 07/22/2024 |
4.1.4 | 66 | 07/22/2024 |
4.1.3.1 | 89 | 07/22/2024 |
4.1.3 | 62 | 07/22/2024 |
4.1.2 | 72 | 07/22/2024 |
4.1.1 | 67 | 07/22/2024 |
4.1.0 | 75 | 07/22/2024 |
4.0.17 | 117 | 07/22/2024 |
4.0.16 | 91 | 07/22/2024 |
4.0.14 | 73 | 07/22/2024 |
4.0.13 | 69 | 07/22/2024 |
4.0.12 | 72 | 07/22/2024 |
4.0.11 | 78 | 07/22/2024 |
4.0.10 | 80 | 07/22/2024 |
4.0.9 | 78 | 07/22/2024 |
4.0.8 | 76 | 07/22/2024 |
4.0.7 | 76 | 07/22/2024 |
4.0.6 | 75 | 07/22/2024 |
4.0.5 | 65 | 07/22/2024 |
4.0.4 | 74 | 07/22/2024 |
4.0.3 | 75 | 07/22/2024 |
4.0.2 | 80 | 07/22/2024 |
4.0.1 | 64 | 07/22/2024 |
4.0.0 | 66 | 07/22/2024 |
4.0.0-rc1 | 74 | 07/22/2024 |
4.0.0-preview2 | 69 | 07/22/2024 |
4.0.0-preview1 | 76 | 07/22/2024 |
3.2.7 | 67 | 07/22/2024 |
3.2.6 | 77 | 07/22/2024 |
3.2.5 | 81 | 07/22/2024 |
3.2.4.1 | 68 | 07/22/2024 |
3.2.4 | 77 | 07/22/2024 |
3.2.3 | 77 | 07/22/2024 |
3.2.2 | 71 | 07/22/2024 |
3.2.1 | 76 | 07/22/2024 |
3.2.0 | 67 | 07/22/2024 |
3.1.10 | 66 | 07/22/2024 |
3.1.9 | 73 | 07/22/2024 |
3.1.8 | 66 | 07/22/2024 |
3.1.7 | 68 | 07/22/2024 |
3.1.6 | 66 | 07/22/2024 |
3.1.5 | 74 | 07/22/2024 |
3.1.4 | 70 | 07/22/2024 |
3.1.3 | 76 | 07/22/2024 |
3.1.2 | 63 | 07/22/2024 |
3.1.1 | 76 | 07/22/2024 |
3.1.0 | 61 | 07/22/2024 |
3.0.8 | 63 | 07/22/2024 |
3.0.7 | 71 | 07/22/2024 |
3.0.6 | 82 | 07/22/2024 |
3.0.5 | 78 | 07/22/2024 |
3.0.4 | 80 | 07/22/2024 |
3.0.3 | 75 | 07/22/2024 |
3.0.2 | 79 | 07/22/2024 |
3.0.1 | 66 | 07/22/2024 |
3.0.0 | 73 | 07/22/2024 |
2.2.7 | 76 | 07/22/2024 |
2.2.6 | 79 | 07/22/2024 |
2.2.5 | 85 | 07/22/2024 |
2.2.4.3 | 71 | 07/22/2024 |
2.2.4.1 | 74 | 07/22/2024 |
2.2.3 | 74 | 07/22/2024 |
2.2.2 | 62 | 07/22/2024 |
2.2.1 | 83 | 07/22/2024 |
2.2.0 | 72 | 07/22/2024 |
2.1.3 | 73 | 07/22/2024 |
2.1.2 | 84 | 07/22/2024 |
2.1.1 | 72 | 07/22/2024 |
2.1.0 | 77 | 07/22/2024 |
2.0.14.3 | 71 | 07/22/2024 |
2.0.12.1 | 79 | 07/22/2024 |
2.0.11 | 61 | 07/22/2024 |