diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index a9a98e6b9cf..44aa38ac9f3 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -3897,7 +3897,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 35385c59205..e1c62b83db9 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -3942,7 +3942,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 96361e36611..47be0908cc0 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -845,7 +845,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