EF.Toolkit.Bulk.PostgreSQL 10.0.0-alpha.5

This is a prerelease version of EF.Toolkit.Bulk.PostgreSQL.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package EF.Toolkit.Bulk.PostgreSQL --version 10.0.0-alpha.5
                    
NuGet\Install-Package EF.Toolkit.Bulk.PostgreSQL -Version 10.0.0-alpha.5
                    
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="EF.Toolkit.Bulk.PostgreSQL" Version="10.0.0-alpha.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EF.Toolkit.Bulk.PostgreSQL" Version="10.0.0-alpha.5" />
                    
Directory.Packages.props
<PackageReference Include="EF.Toolkit.Bulk.PostgreSQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EF.Toolkit.Bulk.PostgreSQL --version 10.0.0-alpha.5
                    
#r "nuget: EF.Toolkit.Bulk.PostgreSQL, 10.0.0-alpha.5"
                    
#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.
#:package EF.Toolkit.Bulk.PostgreSQL@10.0.0-alpha.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EF.Toolkit.Bulk.PostgreSQL&version=10.0.0-alpha.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EF.Toolkit.Bulk.PostgreSQL&version=10.0.0-alpha.5&prerelease
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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