| From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
| Cc: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Conflict handling for COPY FROM |
| Date: | 2019-07-16 07:08:37 |
| Message-ID: | CALAY4q89O2f1+5RMc6nq5QpV7br8VZM9FK_zOh9jUS_AkuOGqw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 14, 2019 at 7:40 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
>
> error_limit being an integer, please don't use it as a boolean:
>
> if (cstate->error_limit)
>
...
>
> Add an explicit comparison to zero instead, for code readability.
> Also, since each error decrements the same variable, it becomes hard to
> reason about the state: at the end, are we ending with the exact number
> of errors, or did we start with the feature disabled? I suggest that
> it'd make sense to have a boolean indicating whether this feature has
> been requested, and the integer is just the remaining allowed problems.
>
>
done
Line 3255 or thereabouts contains an excess " char
>
>
fixed
> The "warn about it" comment is obsolete, isn't it? There's no warning
> there.
>
>
fixed
i also add an option to ignore all errors in ERROR set to -1
| Attachment | Content-Type | Size |
|---|---|---|
| conflict-handling-onCopy-from-v8.patch | text/x-patch | 13.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2019-07-16 07:11:44 | Re: refactoring - share str2*int64 functions |
| Previous Message | Ibrar Ahmed | 2019-07-16 06:39:10 | Re: pgbench - extend initialization phase control |