Re: COPY TO (FREEZE)? - Mailing list pgsql-hackers

From Mingli Zhang
Subject Re: COPY TO (FREEZE)?
Date
Msg-id CANG7CALFO7tVq=9tEyapAmPSwGBGThLqGJ63ZP12Ky-wBdupZQ@mail.gmail.com
Whole thread Raw
In response to Re: COPY TO (FREEZE)?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: COPY TO (FREEZE)?
List pgsql-hackers


Bruce Momjian <bruce@momjian.us>于2023年10月29日 周日10:04写道:
On Sat, Oct 28, 2023 at 09:54:05PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > On Sat, Oct 28, 2023 at 09:39:53PM -0400, Tom Lane wrote:
> >> Not thrilled by the wording here.
>
> > I think it is modeled after:
>
> >     errmsg("COPY force null only available using COPY FROM")));
>
> Well, now that you bring it up, that's no sterling example of
> clear writing either.  Maybe change that while we're at it,
> say to "FORCE NULL option must not be used in COPY TO"?

I used:

        "COPY FREEZE mode cannot be used with COPY FROM"

and adjusted the others.

> (Also, has it got the right ERRCODE?)

Fixed, and the other cases too.  Patch attached.

--
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.

 errmsg("COPY force not null only available using COPY FROM")));
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("COPY force not null cannot be used with COPY FROM")));

cannot -> can ?

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: pg_upgrade test failure
Next
From: Mingli Zhang
Date:
Subject: Re: COPY TO (FREEZE)?