Re: COPY TO (FREEZE)?

2023-11-13 Thread Bruce Momjian
On Mon, Nov 13, 2023 at 01:17:32PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > Patch applied to master. > > The buildfarm is quite unhappy with you. Wow, I never suspeced that, fixed. -- Bruce Momjian https://momjian.us EDB

Re: COPY TO (FREEZE)?

2023-11-13 Thread Tom Lane
Bruce Momjian writes: > Patch applied to master. The buildfarm is quite unhappy with you. regards, tom lane

Re: COPY TO (FREEZE)?

2023-11-13 Thread Bruce Momjian
On Mon, Oct 30, 2023 at 03:55:21PM -0400, Bruce Momjian wrote: > On Mon, Oct 30, 2023 at 02:29:05PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > That is a good point. I reviewed more of the messages and added > > > capitalization where appropriate, patch attached. > > > > This is

Re: COPY TO (FREEZE)?

2023-10-30 Thread Zhang Mingli
HI, Zhang Mingli www.hashdata.xyz On Oct 31, 2023 at 03:55 +0800, Bruce Momjian , wrote: > > Sure, updated patch attached. LGTM.

Re: COPY TO (FREEZE)?

2023-10-30 Thread Bruce Momjian
https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index d12ba96497..18ecc69c33 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -224,6 +224,7 @@ COP

Re: COPY TO (FREEZE)?

2023-10-30 Thread Tom Lane
Bruce Momjian writes: > That is a good point. I reviewed more of the messages and added > capitalization where appropriate, patch attached. This is starting to look pretty good. I have one more thought, as long as we're touching all these messages anyway: how about s/FOO available only in CSV

Re: COPY TO (FREEZE)?

2023-10-30 Thread Bruce Momjian
b/doc/src/sgml/ref/copy.sgml index d12ba96497..18ecc69c33 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -224,6 +224,7 @@ COPY { table_name [ ( COPY FREEZE on a partitioned table. + This option is only allowed in COPY FROM. Note tha

Re: COPY TO (FREEZE)?

2023-10-30 Thread Kyotaro Horiguchi
At Sun, 29 Oct 2023 15:35:02 -0400, Bruce Momjian wrote in > You are 100% correct. Updated patch attached. -errmsg("COPY force not null only available using COPY FROM"))); +errmsg("COPY force not null cannot be used with COPY

Re: COPY TO (FREEZE)?

2023-10-29 Thread Zhang Mingli
; > >   Only you can decide what is important to you. > > > > > > > > (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > > > > + errmsg("COPY FREEZE mode cannot be used with COPY FROM"))); > > > > + > > > > > > COPY FROM-

Re: COPY TO (FREEZE)?

2023-10-29 Thread Bruce Momjian
  Updated patch attached. > > -- >   Bruce Momjian          https://momjian.us >   EDB                                      https://enterprisedb.com > >   Only you can decide what is important to you. > > > > (errcode(ERRCODE_INVALID_PARAMETER_

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
tps://momjian.us > EDB https://enterprisedb.com > > Only you can decide what is important to you. (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > > + errmsg("COPY FREEZE mode cannot be used with COPY FROM"))); > > + > > COPY FROM-> COPY TO >

Re: COPY TO (FREEZE)?

2023-10-29 Thread Bruce Momjian
you can decide what is important to you. diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index d12ba96497..82b65543c3 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -224,6 +224,7 @@ COPY { table_name [ ( COPY FREEZE on a partitioned ta

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
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" >> &

Re: COPY TO (FREEZE)?

2023-10-29 Thread Mingli Zhang
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

Re: COPY TO (FREEZE)?

2023-10-28 Thread Bruce Momjian
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 cann

Re: COPY TO (FREEZE)?

2023-10-28 Thread Tom Lane
Bruce Momjian 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

Re: COPY TO (FREEZE)?

2023-10-28 Thread Bruce Momjian
ATIN1 encoding > but not when the server is using UTF8. So I don't see how the > distinction you presented justifies this change. Agreed, my mistake. > + if (opts_out->freeze && !is_from) > + ereport(ERROR, > + (errcode(ERRCODE_

Re: COPY TO (FREEZE)?

2023-10-28 Thread Tom Lane
if (opts_out->freeze && !is_from) + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("COPY freeze only available using COPY FROM"))); Not thrilled by the wording here. I don't

Re: COPY TO (FREEZE)?

2023-10-28 Thread Bruce Momjian
://enterprisedb.com Only you can decide what is important to you. diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index d12ba96497..82b65543c3 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -224,6 +224,7 @@ COPY { table_name [ ( COPY F

Re: COPY TO (FREEZE)?

2023-10-28 Thread Bruce Momjian
On Tue, Aug 2, 2022 at 05:17:35PM +0900, Kyotaro Horiguchi wrote: > At Tue, 2 Aug 2022 14:17:46 +0800, Julien Rouhaud wrote > in > > Hi, > > > > On Tue, Aug 02, 2022 at 01:30:46PM +0900, Kyotaro Horiguchi wrote: > > > I noticed that COPY TO accepts

Re: COPY TO (FREEZE)?

2022-08-02 Thread Zhang Mingli
Regards, Zhang Mingli On Aug 2, 2022, 12:30 +0800, Kyotaro Horiguchi , wrote: > I noticed that COPY TO accepts FREEZE option but it is pointless. > > Don't we reject that option as the first-attached does? I +1, should be rejected like other invalid options. > > regards. &

Re: COPY TO (FREEZE)?

2022-08-02 Thread Kyotaro Horiguchi
At Tue, 2 Aug 2022 14:17:46 +0800, Julien Rouhaud wrote in > Hi, > > On Tue, Aug 02, 2022 at 01:30:46PM +0900, Kyotaro Horiguchi wrote: > > I noticed that COPY TO accepts FREEZE option but it is pointless. > > > > Don't we reject that option as the first-attached

Re: COPY TO (FREEZE)?

2022-08-02 Thread Julien Rouhaud
Hi, On Tue, Aug 02, 2022 at 01:30:46PM +0900, Kyotaro Horiguchi wrote: > I noticed that COPY TO accepts FREEZE option but it is pointless. > > Don't we reject that option as the first-attached does? I agree that we should reject it, +1 for the patch. > By the way, most of the in

COPY TO (FREEZE)?

2022-08-01 Thread Kyotaro Horiguchi
I noticed that COPY TO accepts FREEZE option but it is pointless. Don't we reject that option as the first-attached does? I tempted to add tests for those option combinations that are to be rejected but I didin't come up with a clean way to do that. By the way, most of the invalid option