expand on_error ignore error handling scope - Mailing list pgsql-hackers

From jian he
Subject expand on_error ignore error handling scope
Date
Msg-id CACJufxHCwG=Z1L94mi7SrXpBsv3iGUk1S7JQP1WKvy3cxb=vMw@mail.gmail.com
Whole thread Raw
Responses Re: expand on_error ignore error handling scope
List pgsql-hackers
hi.

Currently, (on_error ignore) only handles data type incompatibility errors.
However, we can extend its functionality to also handle errors caused by extra
data (additional columns) or missing data (fewer columns), I think.

on_error is only applicable to non-binary formats.
In non-binary formats (such as text and CSV), COPY FROM cut income source row by
row by newline.  This means that row boundaries are clearly defined.  If a
line's contents cannot be successfully converted to the table's columns, an
error is raised.

Based on this, I think it's doable to let on_error ignore handling missing and
extra data errors.
Hope I didn't miss anything.

previously feature request discussion: [1]
[1]: https://postgr.es/m/CAEHBEOCqqkSitU5gx%3D8aHD3ZeLtRy-1eC%3DXs%3DxB-thFNR9JpYA%40mail.gmail.com

what do you think?



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Next
From: Michael Paquier
Date:
Subject: Re: Sequence Access Methods, round two