Re: Add new error_action COPY ON_ERROR "log"

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Add new error_action COPY ON_ERROR "log"
Дата
Msg-id CALj2ACXfgzGiRpEX2hV6RwQW3YLAEHQG3SfPa4o07YksSVMC0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add new error_action COPY ON_ERROR "log"  (torikoshia <torikoshia@oss.nttdata.com>)
Ответы Re: Add new error_action COPY ON_ERROR "log"  (torikoshia <torikoshia@oss.nttdata.com>)
Re: Add new error_action COPY ON_ERROR "log"  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Thu, Mar 28, 2024 at 1:43 PM torikoshia <torikoshia@oss.nttdata.com> wrote:
>
> Attached patch fixes the doc,

May I know which patch you are referring to? And, what do you mean by
"fixes the doc"?

> but I'm wondering perhaps it might be
> better to modify the codes to prohibit abbreviation of the value.

Please help me understand the meaning here.

> When seeing the query which abbreviates ON_ERROR value, I feel it's not
> obvious what happens compared to other options which tolerates
> abbreviation of the value such as FREEZE or HEADER.
>
>    COPY t1 FROM stdin WITH (ON_ERROR);
>
> What do you think?

So, do you mean to prohibit ON_ERROR being specified without any value
like in COPY t1 FROM stdin WITH (ON_ERROR);? If yes, I think all the
other options do allow that [1].

Even if we were to do something like this, shall we discuss this separately?

Having said that, what do you think of the v13 patch posted upthread?

[1]
postgres=# COPY t1 FROM stdin WITH (
DEFAULT         ESCAPE          FORCE_QUOTE     HEADER          QUOTE
DELIMITER       FORCE_NOT_NULL  FORMAT          NULL
ENCODING        FORCE_NULL      FREEZE          ON_ERROR

postgres=# COPY t1 FROM stdin WITH ( QUOTE );
ERROR:  relation "t1" does not exist
postgres=# COPY t1 FROM stdin WITH ( DEFAULT );
ERROR:  relation "t1" does not exist
postgres=# COPY t1 FROM stdin WITH ( ENCODING );
ERROR:  relation "t1" does not exist

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: torikoshia
Дата:
Сообщение: Re: Add new error_action COPY ON_ERROR "log"
Следующее
От: Tender Wang
Дата:
Сообщение: Re: Can't find not null constraint, but \d+ shows that