diff options
author | Fujii Masao <fujii@postgresql.org> | 2021-08-25 11:46:25 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2021-08-25 11:46:25 +0900 |
commit | 170aec63cd7139b453c52ad52bbeb83993faa31d (patch) | |
tree | dbd6bd8fee7dd3f9a088cc03f48196c5318fe8b5 /src | |
parent | 085400fee9d58d7a97976755ae0627ef072e3776 (diff) | |
download | postgresql-170aec63cd7139b453c52ad52bbeb83993faa31d.tar.gz postgresql-170aec63cd7139b453c52ad52bbeb83993faa31d.zip |
Avoid using ambiguous word "positive" in error message.
There are two identical error messages about valid value of modulus for
hash partition, in PostgreSQL source code. Commit 0e1275fb07 improved
only 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 Horiguchi
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/20210819.170315.1413060634876301811.horikyota.ntt@gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/parser/parse_utilcmd.c | 2 | ||||
-rw-r--r-- | src/test/regress/expected/alter_table.out | 2 | ||||
-rw-r--r-- | src/test/regress/expected/create_table.out | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 675e400839f..e5eefdbd43c 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -4035,7 +4035,7 @@ transformPartitionBound(ParseState *pstate, Relation parent, if (spec->modulus <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("modulus for hash partition must be a positive integer"))); + errmsg("modulus for hash partition must be an integer value greater than zero"))); Assert(spec->remainder >= 0); diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 8dcb00ac67a..4bee0c11735 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -4107,7 +4107,7 @@ ALTER TABLE hash_parted ATTACH PARTITION hpart_5 FOR VALUES WITH (MODULUS 4, REM -- check that the table being attach is with valid modulus and remainder value CREATE TABLE fail_part(LIKE hash_parted); ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 0, REMAINDER 1); -ERROR: modulus for hash partition must be a positive integer +ERROR: modulus for hash partition must be an integer value greater than zero ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 8, REMAINDER 8); ERROR: remainder for hash partition must be less than modulus ALTER TABLE hash_parted ATTACH PARTITION fail_part FOR VALUES WITH (MODULUS 3, REMAINDER 2); diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index 96bf426d98e..a958b849799 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -934,7 +934,7 @@ LINE 1: ...LE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODU... ^ -- modulus must be greater than zero CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 0, REMAINDER 1); -ERROR: modulus for hash partition must be a positive integer +ERROR: modulus for hash partition must be an integer value greater than zero -- remainder must be greater than or equal to zero and less than modulus CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 8, REMAINDER 8); ERROR: remainder for hash partition must be less than modulus |