Re:Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

From: "Yi Ding" <dingyi_yale(at)163(dot)com>
To: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
Cc: "Peter Eisentraut" <peter(at)eisentraut(dot)org>, "jian he" <jian(dot)universality(at)gmail(dot)com>, "Matheus Alcantara" <matheusssilv97(at)gmail(dot)com>, torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com>, "vignesh C" <vignesh21(at)gmail(dot)com>, "Jim Jones" <jim(dot)jones(at)uni-muenster(dot)de>, "Kirill Reshke" <reshkekirill(at)gmail(dot)com>, "Fujii Masao" <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "Yugo NAGATA" <nagata(at)sraoss(dot)co(dot)jp>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re:Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row
Date: 2026-03-13 05:51:25
Message-ID: 5e6ae3c1.48b2.19ce5bfea42.Coremail.dingyi_yale@163.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2026-03-13 10:57:13, "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com> wrote:
>On Wed, Mar 4, 2026 at 10:25 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>
>> On Tue, Mar 3, 2026 at 3:38 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>> > Thanks, committed.
>>
>> Thanks for committing the patch!
>>
>> With this change, ON_ERROR = 'set_null' can now be used with foreign tables
>> backed by file_fdw. However, unlike ON_ERROR = 'ignore', there is currently
>> no regression test covering this behavior in file_fdw.
>>
>> How about adding a regression test to ensure that file_fdw works correctly
>> with ON_ERROR = 'set_null', and to improve test coverage? Patch attached.
>
>Barring any objections, I will commit the patch.
>
>Regards,
>
>--
>Fujii Masao

>

The new test added in v1 makes sense to me. A small suggestion is that to verify if a field is really null, we can do:

ALTER FOREIGN TABLE agg_bad OPTIONS (ADD on_error 'set_null');
SELECT a, b IS NULL FROM agg_bad;

Regards,
Ding Yi

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-03-13 06:10:13 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Previous Message jian he 2026-03-13 05:48:26 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions