]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Avoid using ambiguous word "positive" in error message.
authorFujii Masao <fujii@postgresql.org>
Wed, 25 Aug 2021 02:46:25 +0000 (11:46 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 25 Aug 2021 02:47:46 +0000 (11:47 +0900)
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

src/backend/parser/parse_utilcmd.c
src/test/regress/expected/alter_table.out
src/test/regress/expected/create_table.out

index 49a898b64617810583baa9759ee98ba019717ecf..e9a2b5dc9a686d187b8b7ec89739a51c26c6772c 100644 (file)
@@ -3939,7 +3939,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);
 
index 2e3f20756d265329503a7265b753d2c1dbf480b2..33a98a723c88a76971366aeb86ec23d49aabecaa 100644 (file)
@@ -4099,7 +4099,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);
index 9089b013b7f756e3ce9ebe22f9b018109cf894c9..86ca1381fc2045576a9a644534eb7eb80b394de2 100644 (file)
@@ -894,7 +894,7 @@ CREATE TABLE fail_part PARTITION OF hash_parted2 FOR VALUES WITH (MODULUS 2, REM
 ERROR:  partition "fail_part" would overlap partition "h2part_4"
 -- 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