EF.Toolkit.Bulk.PostgreSQL
10.0.0-alpha.6
See the version list below for details.
dotnet add package EF.Toolkit.Bulk.PostgreSQL --version 10.0.0-alpha.6
NuGet\Install-Package EF.Toolkit.Bulk.PostgreSQL -Version 10.0.0-alpha.6
<PackageReference Include="EF.Toolkit.Bulk.PostgreSQL" Version="10.0.0-alpha.6" />
<PackageVersion Include="EF.Toolkit.Bulk.PostgreSQL" Version="10.0.0-alpha.6" />
<PackageReference Include="EF.Toolkit.Bulk.PostgreSQL" />
paket add EF.Toolkit.Bulk.PostgreSQL --version 10.0.0-alpha.6
#r "nuget: EF.Toolkit.Bulk.PostgreSQL, 10.0.0-alpha.6"
#:package EF.Toolkit.Bulk.PostgreSQL@10.0.0-alpha.6
#addin nuget:?package=EF.Toolkit.Bulk.PostgreSQL&version=10.0.0-alpha.6&prerelease
#tool nuget:?package=EF.Toolkit.Bulk.PostgreSQL&version=10.0.0-alpha.6&prerelease
EF.Toolkit.Bulk.PostgreSQL
The PostgreSQL provider for EF.Toolkit.Bulk. Install this package rather than the core one: it brings the core with it and supplies the executor that does the actual work on Npgsql.
Install
dotnet add package EF.Toolkit.Bulk.PostgreSQL
Setup
One call, after the provider:
services.AddDbContext<AppDb>(o => o
.UseNpgsql(connectionString)
.UseBulkOperations());
If you reference both provider packages, UseBulkOperations is ambiguous — use UseNpgsqlBulk().
What this package provides
Everything in the core is provider-neutral until a batch has been grouped by
(table, state, column shape). This package is what that batch is handed to:
| How it runs on PostgreSQL | |
|---|---|
| Insert | binary COPY |
| Generated keys | sequence values reserved up front (below 17) |
| Update / delete | staging table + UPDATE … FROM / DELETE … USING, with RETURNING |
| Upsert | MERGE … RETURNING merge_action() on 17+, else INSERT … ON CONFLICT … DO UPDATE |
| Synchronize | WHEN NOT MATCHED BY SOURCE on 17+, else a second DELETE … WHERE NOT EXISTS |
Why the version matters
INSERT … ON CONFLICT … RETURNING can only name columns of the target row, never the source, so
before PostgreSQL 17 there is no documented way to map a staged insert's generated keys back to the
rows that produced them. That is why this provider reserves sequence values up front instead.
PostgreSQL 17's MERGE … RETURNING can see the source. On 17 and later neither the reservation
nor the insert-versus-update counting workaround is needed, and the provider selects the better path
automatically — there is nothing to configure.
Staging tables are analysed before they are joined, because a freshly loaded temporary table has no statistics and autovacuum never touches one on PostgreSQL. Without that the planner joins it to the target on a guess.
Supported versions
PostgreSQL 16 and 17, both covered by the differential harness on every commit. Earlier versions are likely to work but are not tested.
Full documentation
Everything else — transparent versus explicit mode, the explicit API, change tracking, options, diagnostics, measured performance and limitations — is in the EF.Toolkit.Bulk documentation.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- EF.Toolkit.Bulk (>= 10.0.0-alpha.6)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0 && < 11.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0 && < 11.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0-alpha.7 | 70 | 10/18/2026 |
| 10.0.0-alpha.6 | 234 | 8/18/2026 |
| 10.0.0-alpha.5 | 102 | 8/15/2026 |
| 10.0.0-alpha.4 | 89 | 8/14/2026 |
| 10.0.0-alpha.3 | 81 | 8/14/2026 |
| 10.0.0-alpha.2 | 83 | 8/9/2026 |
| 10.0.0-alpha.1 | 91 | 8/9/2026 |