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

pinpoint faulty row in bulk insert #608

Open
steve-chavez opened this issue Apr 25, 2023 · 0 comments
Open

pinpoint faulty row in bulk insert #608

steve-chavez opened this issue Apr 25, 2023 · 0 comments
Labels
how-tos Goal oriented guides. Not in depth.

Comments

@steve-chavez
Copy link
Member

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?

@steve-chavez steve-chavez added the how-tos Goal oriented guides. Not in depth. label Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
how-tos Goal oriented guides. Not in depth.
Development

No branches or pull requests

1 participant