Hi! On Thu, 12 Sept 2024 at 15:13, jian he <jian.universal...@gmail.com> wrote: > > On Mon, Sep 9, 2024 at 10:34 PM Jim Jones <jim.jo...@uni-muenster.de> wrote: > > > > > > Hi there > > > > On 26.08.24 02:00, jian he wrote: > > > hi all. > > > patch updated. > > > simplified the code a lot. > > > > > > idea is same: > > > COPY t_on_error_null FROM STDIN WITH (on_error set_to_null); > > > > > > If the STDIN number of columns is the same as the target table, then > > > InputFunctionCallSafe > > > call failure will make that column values be null. > > > > > > > > > If the STDIN number of columns is not the same as the target table, then > > > error > > > ERROR: missing data for column \"%s\" > > > ERROR: extra data after last expected column > > > which is status quo. > > > > I wanted to give it another try, but the patch does not apply ... > > > > here we are. > please check the attached file.
Hi! v4 no longer applies. It now conflicts with e7834a1a251d4a28245377f383ff20a657ba8262. Also, there were review comments. So, I decided to rebase. Review comments from [1] applied partially. I didn't do "and continue with" -> "and will continue with" substitution as suggested, because the first options are used for `ignore` doc one lines above. So, I just don't know how to change this correctly. We definitely don't want two separate forms of saying the same in 2 consecutive lines. I did small changes: 1) added `-- tests for set_to_null` option in the test script akin to 4ac2a9beceb10d44806d2cf157d5a931bdade39e 2) I rephrased Allow "stop", or "ignore", "set_to_null" values to Allow "stop", "ignore", "set_to_null" values PFA. [1] https://www.postgresql.org/message-id/b26e9c6c-75bf-45ea-8aea-346dda3bd445%40uni-muenster.de -- Best regards, Kirill Reshke
v5-0001-on_error-set_to_null.patch
Description: Binary data