Skip to content

Documentation: What about unique constraints? #83

@raratiru

Description

@raratiru

I am trying to understand what happens during copy_from if a table already contains data and a unique constraint is triggered.

By using drop_constraints=False, if a value-to-be-saved already exists in the database will it be ignored or will an error be raised?

Searching the Postgresql-9.5+ docs, I found the ON CONFLICT clause which caters for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions