When inserting multiple rows into a table by a single INSERT INTO
invocation, and the INSERT
statement fails due to reasons specific to some individual rows (e.g. a value has the wrong type for the target column, or a NOT NULL
constraint is violated), can I let PostgreSQL report the content of the offending rows?
For UNIQUE
constraint or exclusion constraint violation errors, it seems I could use the ON CONFLICT
clause to access the offending rows, but is there something similar for other row-specific violations?