Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

torikoshia <torikoshia@oss.nttdata.com>

From: torikoshia <torikoshia@oss.nttdata.com>
To: Damir Belyalov <dam.bel07@gmail.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>, andres@anarazel.de, tgl@sss.pgh.pa.us, daniel@yesql.se, anisimow.d@gmail.com, HukuToc@gmail.com, Andrey Lepikhov <a.lepikhov@postgrespro.ru>, Alena Rybakina <lena.ribackina@yandex.ru>
Date: 2023-09-19T14:00:32Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. doc: Fix COPY ON_ERROR option syntax synopsis.

  2. Disallow specifying ON_ERROR option without value.

  3. Rename COPY option from SAVE_ERROR_TO to ON_ERROR

  4. Fix spelling in notice

  5. Add new COPY option SAVE_ERROR_TO

On 2023-09-15 19:02, Damir Belyalov wrote:
>> Since v5 patch failed applying anymore, updated the patch.
> 
> Thank you for updating the patch . I made a little review on it where
> corrected some formatting.
> 

Thanks for your review and update!
I don't have objections the modification of the codes and comments.
Although v7 patch doesn't have commit messages on the patch, I think 
leave commit message is good for reviewers.

>>> - COPY with a datatype error that can't be handled as a soft error
>> 
>> I didn't know proper way to test this, but I've found data type
>> widget's
>> input function widget_in() defined to occur hard-error in regress.c,
>> attached patch added a test using it.
> 
> This test seems to be weird a bit, because of the "widget" type. The
> hard error is thrown by the previous test with missing data. Also
> it'll be interesting for me to list all cases when a hard error can be
> thrown.

Although missing data error is hard error, the suggestion from Andres 
was adding `dataype` error:

> - COPY with a datatype error that can't be handled as a soft error

As described in widghet_in(), widget is intentionally left emitting hard 
error for testing purpose:

>   * Note: DON'T convert this error to "soft" style (errsave/ereturn).  
> We
>   * want this data type to stay permanently in the hard-error world so 
> that
>   * it can be used for testing that such cases still work reasonably.

 From this point of view, I think this is a supposed way of using widget.
OTOH widget is declared in create_type.sql and I'm not sure it's ok to 
use it in another test copy2.sql.

-- 
Regards,

--
Atsushi Torikoshi
NTT DATA Group Corporation