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

From: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
To: Damir Belyalov <dam(dot)bel07(at)gmail(dot)com>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, andres(at)anarazel(dot)de, tgl(at)sss(dot)pgh(dot)pa(dot)us, daniel(at)yesql(dot)se, anisimow(dot)d(at)gmail(dot)com, HukuToc(at)gmail(dot)com, Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, Alena Rybakina <lena(dot)ribackina(at)yandex(dot)ru>
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Date: 2023-09-19 14:00:32
Message-ID: 58fa3b63e88ffd0a09273e38aec0661e@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Chavez 2023-09-19 14:20:24 Re: Add pg_basetype() function to obtain a DOMAIN base type
Previous Message Hayato Kuroda (Fujitsu) 2023-09-19 13:48:55 RE: pg_ctl start may return 0 even if the postmaster has been already started on Windows