From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Damir Belyalov <dam(dot)bel07(at)gmail(dot)com>, Danil Anisimow <anisimow(dot)d(at)gmail(dot)com>, "HukuToc(at)gmail(dot)com" <HukuToc(at)gmail(dot)com>, torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, "a(dot)lepikhov(at)postgrespro(dot)ru" <a(dot)lepikhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) |
Date: | 2023-02-06 06:00:34 |
Message-ID: | 2592557.1675663234@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> On February 5, 2023 9:12:17 PM PST, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Damir Belyalov <dam(dot)bel07(at)gmail(dot)com> writes:
>>> InputFunctionCallSafe() is good for detecting errors from input-functions
>>> but there are such errors from NextCopyFrom () that can not be detected
>>> with InputFunctionCallSafe(), e.g. "wrong number of columns in row''.
>> If you want to deal with those, then there's more work to be done to make
>> those bits non-error-throwing. But there's a very finite amount of code
>> involved and no obvious reason why it couldn't be done.
> I'm not even sure it makes sense to avoid that kind of error. And
> invalid column count or such is something quite different than failing
> some data type input routine, or falling a constraint.
I think it could be reasonable to put COPY's overall-line-format
requirements on the same level as datatype input format violations.
I agree that trying to trap every kind of error is a bad idea,
for largely the same reason that the soft-input-errors patches
only trap certain kinds of errors: it's too hard to tell whether
an error is an "internal" error that it's scary to continue past.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2023-02-06 06:33:22 | Re: Add progress reporting to pg_verifybackup |
Previous Message | Andres Freund | 2023-02-06 05:52:33 | Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) |