Re: Inaccurate error message when set fdw batch_size to 0

2021-07-27 Thread Fujii Masao
On 2021/07/27 15:06, Bharath Rupireddy wrote: Thanks for the v8 patch, it LGTM. Pushed. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-26 Thread Bharath Rupireddy
On Mon, Jul 26, 2021 at 9:37 PM Fujii Masao wrote: > + > +non-negative > + > +Do not use non-negative word in error messages as it looks > +ambiguous. Instead, use foo must be an integer value greater than > +zero or foo must be an integer value greater than or equal > +to

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-26 Thread Fujii Masao
On 2021/07/26 13:56, Bharath Rupireddy wrote: On Thu, Jul 15, 2021 at 7:54 PM Bharath Rupireddy wrote: On Mon, Jul 12, 2021 at 10:11 PM Bharath Rupireddy wrote: On Mon, Jul 12, 2021 at 9:20 PM Fujii Masao wrote: + + Avoid Using non-negative Word in Error Messages + + +Do not

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-25 Thread Bharath Rupireddy
On Thu, Jul 15, 2021 at 7:54 PM Bharath Rupireddy wrote: > > On Mon, Jul 12, 2021 at 10:11 PM Bharath Rupireddy > wrote: > > > > On Mon, Jul 12, 2021 at 9:20 PM Fujii Masao > > wrote: > > > + > > > + Avoid Using non-negative Word in Error > > > Messages > > > + > > > + > > > +Do not

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-15 Thread Bharath Rupireddy
On Mon, Jul 12, 2021 at 10:11 PM Bharath Rupireddy wrote: > > On Mon, Jul 12, 2021 at 9:20 PM Fujii Masao > wrote: > > + > > + Avoid Using non-negative Word in Error > > Messages > > + > > + > > +Do not use non-negative word in error messages as it > > looks > > +ambiguous. Inst

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-12 Thread Bharath Rupireddy
On Mon, Jul 12, 2021 at 9:20 PM Fujii Masao wrote: > + > + Avoid Using non-negative Word in Error > Messages > + > + > +Do not use non-negative word in error messages as it looks > +ambiguous. Instead, use foo must be an integer value greater than > zero > +or foo must be an

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-12 Thread Fujii Masao
On 2021/07/09 11:41, Bharath Rupireddy wrote: PSA v6 patch. Thanks for updating the patch! + + Avoid Using non-negative Word in Error Messages + + +Do not use non-negative word in error messages as it looks +ambiguous. Instead, use foo must be an integer value greater than

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-08 Thread Bharath Rupireddy
On Fri, Jul 9, 2021 at 6:25 AM Fujii Masao wrote: > The patch could not be applied cleanly because of recent commit d854720df6. > Could you rebase the patch? Thanks. Done. > - /* these must have a non-negative numeric value */ > + /* these must have a

Re: Inaccurate error message when set fdw batch_size to 0

2021-07-08 Thread Fujii Masao
On 2021/05/26 15:22, Bharath Rupireddy wrote: On Thu, May 20, 2021 at 2:43 PM Bharath Rupireddy wrote: Thanks. That looks better. PSA v4 patch. Attaching v5 patch rebased on latest master. The patch could not be applied cleanly because of recent commit d854720df6. Could you rebase the p

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-25 Thread Bharath Rupireddy
On Thu, May 20, 2021 at 2:43 PM Bharath Rupireddy wrote: > > Thanks. That looks better. PSA v4 patch. Attaching v5 patch rebased on latest master. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com v5-0001-Disambiguate-error-messages-that-use-non-negative.patch Descript

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-20 Thread Bharath Rupireddy
On Thu, May 20, 2021 at 1:44 PM Kyotaro Horiguchi wrote: > > At Wed, 19 May 2021 21:48:56 +0530, Bharath Rupireddy > wrote in > > On Wed, May 19, 2021 at 5:20 PM Fujii Masao > > wrote: > > > I'm fine to convert "non-negative" word to "greater than" or "greater than > > > or equal to" in the me

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-20 Thread Kyotaro Horiguchi
At Wed, 19 May 2021 21:48:56 +0530, Bharath Rupireddy wrote in > On Wed, May 19, 2021 at 5:20 PM Fujii Masao > wrote: > > I'm fine to convert "non-negative" word to "greater than" or "greater than > > or equal to" in the messages. But this change also seems to get rid of > > the information ab

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-19 Thread Bharath Rupireddy
On Wed, May 19, 2021 at 5:20 PM Fujii Masao wrote: > > ereport(ERROR, > > (errcode(ERRCODE_SYNTAX_ERROR), > -errmsg("%s requires a > non-negative numeric value", > +

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-19 Thread Fujii Masao
On 2021/05/19 20:01, Bharath Rupireddy wrote: On Mon, May 17, 2021 at 4:23 PM Amit Kapila wrote: On Tue, May 11, 2021 at 11:28 AM Bharath Rupireddy wrote: On Mon, May 10, 2021 at 7:39 PM Tom Lane wrote: Bharath Rupireddy writes: On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: Yea

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-19 Thread Bharath Rupireddy
On Mon, May 17, 2021 at 4:23 PM Amit Kapila wrote: > > On Tue, May 11, 2021 at 11:28 AM Bharath Rupireddy > wrote: > > > > On Mon, May 10, 2021 at 7:39 PM Tom Lane wrote: > > > > > > Bharath Rupireddy writes: > > > > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: > > > >> Yeah, this error me

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-17 Thread Amit Kapila
On Tue, May 11, 2021 at 11:28 AM Bharath Rupireddy wrote: > > On Mon, May 10, 2021 at 7:39 PM Tom Lane wrote: > > > > Bharath Rupireddy writes: > > > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: > > >> Yeah, this error message seems outright buggy. However, it's a minor > > >> matter. Als

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Bharath Rupireddy
On Mon, May 10, 2021 at 7:39 PM Tom Lane wrote: > > Bharath Rupireddy writes: > > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: > >> Yeah, this error message seems outright buggy. However, it's a minor > >> matter. Also, some people think "positive" is the same thing as > >> "non-negative",

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 10:09:40AM -0400, Tom Lane wrote: > Bharath Rupireddy writes: >> if (value < 0) "requires a zero or positive integer value" >> if (value <= 0) "requires a positive integer value" > > I was thinking of avoiding the passive voice and writing > > "foo must be greater t

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Tom Lane
Bharath Rupireddy writes: > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: >> Yeah, this error message seems outright buggy. However, it's a minor >> matter. Also, some people think "positive" is the same thing as >> "non-negative", so maybe we need less ambiguous wording? > Since value 0 ca

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Bharath Rupireddy
On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: > > Fujii Masao writes: > > +1 for the change of the error messages. > > Yeah, this error message seems outright buggy. However, it's a minor > matter. Also, some people think "positive" is the same thing as > "non-negative", so maybe we need les

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-09 Thread Tom Lane
Fujii Masao writes: > +1 for the change of the error messages. Yeah, this error message seems outright buggy. However, it's a minor matter. Also, some people think "positive" is the same thing as "non-negative", so maybe we need less ambiguous wording? > One question is; should we back-patch t

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-09 Thread Fujii Masao
On 2021/05/10 10:26, tsunakawa.ta...@fujitsu.com wrote: From: houzj.f...@fujitsu.com So, is it better to change the error message to “fetch_size requires a positive integer value” ? I also found fetch_size has the similar issue, attaching a patch to fix this. I have a faint memory that I

RE: Inaccurate error message when set fdw batch_size to 0

2021-05-09 Thread tsunakawa.ta...@fujitsu.com
From: houzj.f...@fujitsu.com > So, is it better to change the error message to “fetch_size requires a > positive integer value” ? > I also found fetch_size has the similar issue, attaching a patch to fix this. I have a faint memory that I fixed them after receiving the same feedback from someo

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-07 Thread Dilip Kumar
On Sat, May 8, 2021 at 9:09 AM houzj.f...@fujitsu.com wrote: > > The error message here seems not accurate, because > > I can see from the code batch_size should be positive ( > 0). > > So, is it better to change the error message to “fetch_size requires a > positive integer value” ? > > I also

Inaccurate error message when set fdw batch_size to 0

2021-05-07 Thread houzj.f...@fujitsu.com
Hi, When testing the fdw batch insert, I found a possible issue. If I set the batch_size to 0 , it will throw an error: - CREATE FOREIGN TABLE test(a int, b varchar) SERVER testserver OPTIONS (table_name 'testlocal', batch_size '0'); ERROR: fetch_size requires a non-nega