Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

pinpoint faulty row in bulk insert #608

Open
@steve-chavez

Description

@steve-chavez

From gitter:

hi I recently started to use Postgres, and I am uploading a long CSV file which contains some errors, such as duplicates; Postgrest tells me that something is violating the unique constraint of a column, but I do not know which row is the problematic one; do you have any idea how to provide such information to the client?

that is great, thank you! I made this code (for future reference):
exception
when others then
raise exception using
errcode = sqlstate,
message = sqlerrm,
detail = new;

Basically is sending the new row in the detail of the error. This seems generally useful.

Look into making it a how-to or perhaps include in core?

Metadata

Metadata

Assignees

No one assigned

    Labels

    how-tosGoal oriented guides. Not in depth.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions