Some leftovers of recent message cleanup?

Started by Kyotaro Horiguchiover 5 years ago8 messageshackers
Jump to latest
#1Kyotaro Horiguchi
horikyota.ntt@gmail.com

Hello.

While I was examining message translation for PG14, I found some
messages that would need to be fixed.

0001 is a fix for perhaps-leftovers of the recent message cleanups
related to "positive integer"(fd90f6ba7a).

0002 is a fix for a maybe-mistake in message convention of a recent
fix in ECPG of linked-connection (about trailing period and
lower-cased commad names)

0003 is a fix for remaining "positive" use, which are in doubt in
worthiness to fix..

Please find the attached.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

0001-Additional-message-fix-related-to-positive-wordings.patchtext/x-patch; charset=us-asciiDownload+2-3
0002-Message-cleanup.patchtext/x-patch; charset=us-asciiDownload+1-2
0003-Exterminate-usages-of-positive.patchtext/x-patch; charset=us-asciiDownload+5-6
#2Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Kyotaro Horiguchi (#1)
Re: Some leftovers of recent message cleanup?

On 2021/08/19 17:03, Kyotaro Horiguchi wrote:

Hello.

While I was examining message translation for PG14, I found some
messages that would need to be fixed.

0001 is a fix for perhaps-leftovers of the recent message cleanups
related to "positive integer"(fd90f6ba7a).

There are still other many messages using "positive" and "negative" keywords.
We should also fix them at all?

BTW, we discussed this before at [1]/messages/by-id/CALj2ACV7KDM8R=SrDbxvxT5yMDi+BMWVVV_UwmmHiii1pumr8Q@mail.gmail.com and concluded that at first
we should focus on the fix of the ambiguous "non-negative" and
let "positive" and "negative" keywords as they are.

[1]: /messages/by-id/CALj2ACV7KDM8R=SrDbxvxT5yMDi+BMWVVV_UwmmHiii1pumr8Q@mail.gmail.com
/messages/by-id/CALj2ACV7KDM8R=SrDbxvxT5yMDi+BMWVVV_UwmmHiii1pumr8Q@mail.gmail.com

0002 is a fix for a maybe-mistake in message convention of a recent
fix in ECPG of linked-connection (about trailing period and
lower-cased commad names)

LGTM.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#3Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Fujii Masao (#2)
Re: Some leftovers of recent message cleanup?

At Thu, 19 Aug 2021 20:29:42 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in

On 2021/08/19 17:03, Kyotaro Horiguchi wrote:

Hello.
While I was examining message translation for PG14, I found some
messages that would need to be fixed.
0001 is a fix for perhaps-leftovers of the recent message cleanups
related to "positive integer"(fd90f6ba7a).

There are still other many messages using "positive" and "negative"
keywords.
We should also fix them at all?

I'm not sure, or no if anything. My main point here is not to avoid
use of such kind of words, but reducing variations of the effectively
the same message from the view of translator burden. The two messages
in 0001 are in that category. I noticed those messages accidentally. I
don't think they are the only instance of such divergence, but I'm not
going to do a comprehensive examination of such divergences.. (Or do I
need to check that more comprehensively?)

BTW, we discussed this before at [1] and concluded that at first
we should focus on the fix of the ambiguous "non-negative" and
let "positive" and "negative" keywords as they are.

[1]
/messages/by-id/CALj2ACV7KDM8R=SrDbxvxT5yMDi+BMWVVV_UwmmHiii1pumr8Q@mail.gmail.com

Understood. I agree that point and 0003 is worthless as I anticipated.
I misunderstood that "positive" were included in the do-not-use list.

0002 is a fix for a maybe-mistake in message convention of a recent
fix in ECPG of linked-connection (about trailing period and
lower-cased commad names)

LGTM.

Thanks. So I excluded 0003 and added a fix for regression tests
affected by 0001. (I'm a bit surprised that 0002 doesn't break
regression tests.)

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

v2-0001-Merge-diverged-messages.patchtext/x-patch; charset=us-asciiDownload+4-5
v2-0002-Message-cleanup.patchtext/x-patch; charset=us-asciiDownload+1-2
#4Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Kyotaro Horiguchi (#3)
Re: Some leftovers of recent message cleanup?

On 2021/08/20 11:53, Kyotaro Horiguchi wrote:

At Thu, 19 Aug 2021 20:29:42 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in

On 2021/08/19 17:03, Kyotaro Horiguchi wrote:

Hello.
While I was examining message translation for PG14, I found some
messages that would need to be fixed.
0001 is a fix for perhaps-leftovers of the recent message cleanups
related to "positive integer"(fd90f6ba7a).

There are still other many messages using "positive" and "negative"
keywords.
We should also fix them at all?

I'm not sure, or no if anything. My main point here is not to avoid
use of such kind of words, but reducing variations of the effectively
the same message from the view of translator burden. The two messages
in 0001 are in that category. I noticed those messages accidentally. I
don't think they are the only instance of such divergence, but I'm not
going to do a comprehensive examination of such divergences.. (Or do I
need to check that more comprehensively?)

Understood.

-					 errmsg("modulus for hash partition must be a positive integer")));
+					 errmsg("modulus for hash partition must be an integer greater than zero")));

"an integer greater" should be "an integer value greater" because
we use that words in other similar log messages like "modulus for
hash partition must be an integer value greater than zero"
in src/backend/partitioning/partbounds.c?

I'm thinking to back-patch this to v11 where hash partitioning
was supported. On the other hand, the following change should
be back-patched to all supported versions.

-							 errmsg("distance in phrase operator should not be greater than %d",
+							 errmsg("distance in phrase operator must be an integer value between zero and %d inclusive",

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#5Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Fujii Masao (#4)
Re: Some leftovers of recent message cleanup?

At Fri, 20 Aug 2021 19:36:02 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in

On 2021/08/20 11:53, Kyotaro Horiguchi wrote:

At Thu, 19 Aug 2021 20:29:42 +0900, Fujii Masao
<masao.fujii@oss.nttdata.com> wrote in

On 2021/08/19 17:03, Kyotaro Horiguchi wrote:

Hello.
While I was examining message translation for PG14, I found some
messages that would need to be fixed.
0001 is a fix for perhaps-leftovers of the recent message cleanups
related to "positive integer"(fd90f6ba7a).

There are still other many messages using "positive" and "negative"
keywords.
We should also fix them at all?

I'm not sure, or no if anything. My main point here is not to avoid
use of such kind of words, but reducing variations of the effectively
the same message from the view of translator burden. The two messages
in 0001 are in that category. I noticed those messages accidentally. I
don't think they are the only instance of such divergence, but I'm not
going to do a comprehensive examination of such divergences.. (Or do I
need to check that more comprehensively?)

Understood.

-					 errmsg("modulus for hash partition must be a positive
-					 integer")));
+ errmsg("modulus for hash partition must be an integer greater than
zero")));

"an integer greater" should be "an integer value greater" because
we use that words in other similar log messages like "modulus for
hash partition must be an integer value greater than zero"
in src/backend/partitioning/partbounds.c?

Ugh... Of course. I thought I did that way but the actual file is
incorrect... Fixed that in the attached.

I'm thinking to back-patch this to v11 where hash partitioning
was supported. On the other hand, the following change should

If I'm not missing something, back to 13, where the "word change" took
place? For 11 and 12, we need to change the *both* messages.

v11, 12
./src/backend/parser/parse_utilcmd.c3744: errmsg("modulus for hash partition must be a positive integer")));
Binary file ./src/backend/parser/gram.o matches
./src/backend/partitioning/partbounds.c2086: errmsg("modulus for hash partition must be a positive integer")));

v13, 14
./src/backend/parser/parse_utilcmd.c3942: errmsg("modulus for hash partition must be a positive integer")));
./src/backend/partitioning/partbounds.c4640: errmsg("modulus for hash partition must be an integer value greater than zero")));

be back-patched to all supported versions.

-							 errmsg("distance in phrase operator should not be
-							 greater than %d",
+ errmsg("distance in phrase operator must be an integer value between
zero and %d inclusive",

The message is inconsistent since before the "postive" patch^^;

v10, 11, 12
./src/backend/utils/adt/tsquery.c200: errmsg("distance in phrase operator should not be greater than %d",
./src/backend/utils/adt/tsquery_op.c123: errmsg("distance in phrase operator should be non-negative and less than %d",

v13,14
./src/backend/utils/adt/tsquery.c200: errmsg("distance in phrase operator should not be greater than %d",
./src/backend/utils/adt/tsquery_op.c124: errmsg("distance in phrase operator must be an integer value between zero and %d inclusive",

So this patch is meaningful only for v13 and later, too. Not sure what
to do for v12 and earlier but doesn't seem to be in much necessity.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

v3-0001-Unify-diverged-messages.patchtext/x-patch; charset=us-asciiDownload+4-5
v3-0002-Message-cleanup.patchtext/x-patch; charset=us-asciiDownload+1-2
#6Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Kyotaro Horiguchi (#5)
Re: Some leftovers of recent message cleanup?

On 2021/08/23 15:27, Kyotaro Horiguchi wrote:

So this patch is meaningful only for v13 and later, too. Not sure what
to do for v12 and earlier but doesn't seem to be in much necessity.

Probably I failed to get your point... I was thinking that
your 0001 patch can be back-patched to v11. And also
the attached patch can be applied to v10 and v9.6. If we do this,
the log messages can be consistent between versions.
But you think that we should not change the log messages
in v12 or before, for some reasons?

I pushed your 0002 patch. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

pg10.patchtext/plain; charset=UTF-8; name=pg10.patch; x-mac-creator=0; x-mac-type=0Download+1-1
#7Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Fujii Masao (#6)
Re: Some leftovers of recent message cleanup?

At Wed, 25 Aug 2021 10:05:25 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in

On 2021/08/23 15:27, Kyotaro Horiguchi wrote:

So this patch is meaningful only for v13 and later, too. Not sure what
to do for v12 and earlier but doesn't seem to be in much necessity.

Probably I failed to get your point... I was thinking that
your 0001 patch can be back-patched to v11. And also
the attached patch can be applied to v10 and v9.6. If we do this,
the log messages can be consistent between versions.
But you think that we should not change the log messages
in v12 or before, for some reasons?

Sigh. The message of partbounds.c of v11,12 cited there was just
wrong. So, you're right that it is simply applicable to v11 and
later. Sorry for the confusion.

I pushed your 0002 patch. Thanks!

Thanks for committing!

regares.

--
Kyotaro Horiguchi
NTT Open Source Software Center

#8Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Kyotaro Horiguchi (#7)
Re: Some leftovers of recent message cleanup?

On 2021/08/25 10:50, Kyotaro Horiguchi wrote:

Sigh. The message of partbounds.c of v11,12 cited there was just
wrong. So, you're right that it is simply applicable to v11 and
later. Sorry for the confusion.

I separated the patch into two, to make the commit message of each change clear.
And I pushed them. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION