While copying the data from a CSV file it’s throwing the issue as:
SQL Error [23514]: ERROR: new row for relation
The location of the CSV file and the table name have been checked.
I have tried using different delimiter which also ends up with the same error.
copy groups from 'C:/test.csv' DELIMITER '~';
2
Answers
According to the list of Postgres error-codes the error code
23514
means "check violation". So you should visit all theCHECK
constraints defined on your table and find out, what the problematic constraint checks.Note that the name of the constraint as well as the offending row are usually mentioned in the error message. It looks like you only posted part of it.
Grepping the PostgreSQL source, I assume that the error message really was:
You look at the definition of the constraint and the new row, then it will become clear why the error was thrown.