From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | me nefcanto <sn(dot)1361(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Bug in copy |
Date: | 2025-02-08 05:45:02 |
Message-ID: | CAKFQuwYzvdjYLr2u94Q1a+OB6yRSUHo-SFGBA2HzYWoFLJNTXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Feb 7, 2025 at 10:28 PM me nefcanto <sn(dot)1361(at)gmail(dot)com> wrote:
>
> copy "Parts" ("Id","Title") from stdin with (format csv, delimiter ",",
> on_error ignore)
>
> But I receive this error:
>
> duplicate key value violates unique constraint "PartsUniqueLocaleTitle"
>
> This means that the on_error setting is not working. When I try to insert
> a million records, this becomes extremely annoying and counterproductive.
>
> When we specify that on_error should be ignored, any type of error
> including data type inconsistency, check constraint inconsistency, foreign
> key inconsistency, etc. should be ignored and Postgres should move to the
> next record and not fail the entire bulk operation.
>
While the would be a possible definition to implement what actually is
implemented is:
"Specifies how to behave when encountering an error converting a column's
input value into its data type."
Thus the observed behavior is not a bug.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Zhang Mingli | 2025-02-08 05:52:14 | Re: Bug in copy |
Previous Message | me nefcanto | 2025-02-08 05:28:22 | Bug in copy |