Skip to content

Feature request: support ignoreDuplicates in bulkCreate for Postgres 9.5+ (using ON CONFLICT DO NOTHING) #9882

@jedwards1211

Description

@jedwards1211

What are you doing?

I'd like to use bulkCreate within a transaction with Postgres without causing the transaction to rollback if there are duplicate keys.

What do you expect to happen?

I wanted Foo!
bulkCreate with ignoreDuplicates uses ON CONFLICT DO NOTHING now that Postgres supports it.

What is actually happening?

But the output was bar!
According to the docs, ignoreDuplicates is not supported in Postgres.

Output, either JSON or SQL

Dialect: postgres
Dialect version: current docs
Database version: > 9.5
Sequelize version: current docs
Tested with latest release: N/A (If yes, specify that version)

Note : Your issue may be ignored OR closed by maintainers if it's not tested against latest version OR does not follow issue template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dialect: postgresFor issues and PRs. Things that involve PostgreSQL (and do not involve all dialects).type: featureDEPRECATED: replace with the "feature" issue type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions