Re: Small fix on COPY ON_ERROR document

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Small fix on COPY ON_ERROR document
Дата
Msg-id CAKFQuwYSR61-wqoQKRbmWs7cqHTQOpJRz8o8Jo4H_ddFSRMs-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Small fix on COPY ON_ERROR document  (Yugo NAGATA <nagata@sraoss.co.jp>)
Ответы Re: Small fix on COPY ON_ERROR document  (Yugo NAGATA <nagata@sraoss.co.jp>)
Список pgsql-hackers
On Thursday, January 25, 2024, Yugo NAGATA <nagata@sraoss.co.jp> wrote:

Maybe, we can separate the sentese to two, for example:

  COPY stops operation at the first error. (The exception is if the error
  is due to data type incompatibility and a value other than stop is specified
  to the ON_ERROR option.)

I’d lean more toward saying:

Copy from can be instructed to ignore errors that arise from casting input data to the data types of the target columns by setting the on_error option to ignore.  Skipping the entire input row in the process.

The last part is because another way to ignore would be to set null values for those columns.

That a command stops on an error is the assumed behavior throughout the system, writing “copy stops operation at the first error.” just seems really unnecessary.

I will need to make this tweak and probably a couple others to my own suggestions in 12 hours or so.

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Delay Memoize hashtable build until executor run
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Remove unused fields in ReorderBufferTupleBuf