Re: Add new error_action COPY ON_ERROR "log"

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, jian(dot)universality(at)gmail(dot)com, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: Add new error_action COPY ON_ERROR "log"
Date: 2024-03-13 05:39:06
Message-ID: ZfE7-gZPZrQL_Lbl@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 13, 2024 at 08:08:42AM +0530, Bharath Rupireddy wrote:
> On Wed, Mar 13, 2024 at 5:16 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> The attached 0003 is what I had in mind:
>> - Simplification of the LOG generated with quotes applied around the
>> column name, don't see much need to add the relation name, either, for
>> consistency and because the knowledge is known in the query.
>> - A few more tests.
>> - Some doc changes.
>
> LGMT. So, I've merged those changes into 0001 and 0002.

I've applied the extra tests for now, as this was really confusing.

Hmm. This NOTICE is really bugging me. It is true that the clients
would get more information, but the information is duplicated on the
server side because the error context provides the same information as
the NOTICE itself:
NOTICE: data type incompatibility at line 1 for column "a"
CONTEXT: COPY aa, line 1, column a: "a"
STATEMENT: copy aa from stdin with (on_error ignore, log_verbosity verbose);
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2024-03-13 05:43:11 Re: meson: Specify -Wformat as a common warning flag for extensions
Previous Message torikoshia 2024-03-13 05:28:42 Re: RFC: Logging plan of the running query