aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/collationcmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2023-10-20 22:52:15 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2023-10-20 22:52:15 +0200
commitb62a3fa1cc66ab0d3356c0262b743909d2066504 (patch)
tree89a3fbaea20cf005d93d21e11192b4725f854631 /src/backend/commands/collationcmds.c
parentc79ca0485a62b2abefabd538ac896cd64f4e7a01 (diff)
downloadpostgresql-b62a3fa1cc66ab0d3356c0262b743909d2066504.tar.gz
postgresql-b62a3fa1cc66ab0d3356c0262b743909d2066504.zip
Make some error strings more generic
It's undesirable to have SQL commands or configuration options in a translatable error string, so take some of these out.
Diffstat (limited to 'src/backend/commands/collationcmds.c')
-rw-r--r--src/backend/commands/collationcmds.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c
index efb8b4d289f..4088481b9c7 100644
--- a/src/backend/commands/collationcmds.c
+++ b/src/backend/commands/collationcmds.c
@@ -250,19 +250,22 @@ DefineCollation(ParseState *pstate, List *names, List *parameters, bool if_not_e
if (!collcollate)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("parameter \"lc_collate\" must be specified")));
+ errmsg("parameter \"%s\" must be specified",
+ "lc_collate")));
if (!collctype)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("parameter \"lc_ctype\" must be specified")));
+ errmsg("parameter \"%s\" must be specified",
+ "lc_ctype")));
}
else if (collprovider == COLLPROVIDER_ICU)
{
if (!colliculocale)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("parameter \"locale\" must be specified")));
+ errmsg("parameter \"%s\" must be specified",
+ "locale")));
/*
* During binary upgrade, preserve the locale string. Otherwise,
@@ -416,7 +419,9 @@ AlterCollation(AlterCollationStmt *stmt)
if (collOid == DEFAULT_COLLATION_OID)
ereport(ERROR,
(errmsg("cannot refresh version of default collation"),
- errhint("Use ALTER DATABASE ... REFRESH COLLATION VERSION instead.")));
+ /* translator: %s is an SQL command */
+ errhint("Use %s instead.",
+ "ALTER DATABASE ... REFRESH COLLATION VERSION")));
if (!object_ownercheck(CollationRelationId, collOid, GetUserId()))
aclcheck_error(ACLCHECK_NOT_OWNER, OBJECT_COLLATION,