Re: Conflict handling for COPY FROM

Поиск
Список
Период
Сортировка
От Surafel Temesgen
Тема Re: Conflict handling for COPY FROM
Дата
Msg-id CALAY4q89O2f1+5RMc6nq5QpV7br8VZM9FK_zOh9jUS_AkuOGqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Conflict handling for COPY FROM  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Conflict handling for COPY FROM  (Alexey Kondratov <a.kondratov@postgrespro.ru>)
Список pgsql-hackers


On Sun, Jul 14, 2019 at 7:40 PM Alvaro Herrera <alvherre@2ndquadrant.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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ibrar Ahmed
Дата:
Сообщение: Re: pgbench - extend initialization phase control
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: refactoring - share str2*int64 functions