Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit170aec6

Browse files
committed
Avoid using ambiguous word "positive" in error message.
There are two identical error messages about valid value of modulus forhash partition, in PostgreSQL source code. Commit0e1275f improvedonly one of them so that ambiguous word "positive" was avoided there,and forgot to improve the other. This commit improves the other.Which would reduce translator burden.Back-pach to v11 where the error message exists.Author: Kyotaro HoriguchiReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/20210819.170315.1413060634876301811.horikyota.ntt@gmail.com
1 parent085400f commit170aec6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎src/backend/parser/parse_utilcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4035,7 +4035,7 @@ transformPartitionBound(ParseState *pstate, Relation parent,
40354035
if (spec->modulus <=0)
40364036
ereport(ERROR,
40374037
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
4038-
errmsg("modulus for hash partition must bea positiveinteger")));
4038+
errmsg("modulus for hash partition must beaninteger value greater than zero")));
40394039

40404040
Assert(spec->remainder >=0);
40414041

‎src/test/regress/expected/alter_table.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4107,7 +4107,7 @@ ALTER TABLE hash_parted ATTACH PARTITION hpart_5 FOR VALUES WITH (MODULUS 4, REM
41074107
-- check that the table being attach is with valid modulus and remainder value
41084108
CREATE TABLE fail_part(LIKE hash_parted);
41094109
ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 0, REMAINDER 1);
4110-
ERROR: modulus for hash partition must bea positiveinteger
4110+
ERROR: modulus for hash partition must beaninteger value greater than zero
41114111
ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 8, REMAINDER 8);
41124112
ERROR: remainder for hash partition must be less than modulus
41134113
ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 3, REMAINDER 2);

‎src/test/regress/expected/create_table.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ LINE 1: ...LE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODU...
934934
^
935935
-- modulus must be greater than zero
936936
CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 0, REMAINDER 1);
937-
ERROR: modulus for hash partition must bea positiveinteger
937+
ERROR: modulus for hash partition must beaninteger value greater than zero
938938
-- remainder must be greater than or equal to zero and less than modulus
939939
CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 8);
940940
ERROR: remainder for hash partition must be less than modulus

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp