Skip to content

Support ConflictOption.Ignore for PostgreSQL bulk insert#1955

Open
Balalaikajun wants to merge 3 commits into
borisdj:EFCore9.0from
Balalaikajun:pg-conflict-option-ignore
Open

Support ConflictOption.Ignore for PostgreSQL bulk insert#1955
Balalaikajun wants to merge 3 commits into
borisdj:EFCore9.0from
Balalaikajun:pg-conflict-option-ignore

Conversation

@Balalaikajun

Copy link
Copy Markdown

Closes #1701

Summary

  • Adds PostgreSQL support for BulkConfig.ConflictOption = ConflictOption.Ignore during bulk insert.
  • For PostgreSQL, Ignore is implemented with targetless ON CONFLICT DO NOTHING, so all unique/exclusion conflicts are skipped instead of failing the operation.
  • Keeps ConflictOption.Replace unsupported for PostgreSQL and throws NotSupportedException.
  • Rejects ConflictOption.Ignore together with SetOutputIdentity, because targetless conflict handling does not provide a reliable key for mapping skipped rows back to input entities.
  • Updates README with PostgreSQL-specific notes for ConflictOption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant