mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Fix error messages
Some messages related to foreign servers were reporting the server name
without quotes, or not at all; our style is to have all names be quoted,
and the server name already appears quoted in a few other messages, so
just add quotes and make them all consistent.
Remove an extra "s" in other messages (typos introduced by myself in
f56f8f8da6).
This commit is contained in:
@@ -1184,7 +1184,7 @@ CreateUserMapping(CreateUserMappingStmt *stmt)
|
||||
{
|
||||
ereport(NOTICE,
|
||||
(errcode(ERRCODE_DUPLICATE_OBJECT),
|
||||
errmsg("user mapping for \"%s\" already exists for server %s, skipping",
|
||||
errmsg("user mapping for \"%s\" already exists for server \"%s\", skipping",
|
||||
MappingUserName(useId),
|
||||
stmt->servername)));
|
||||
|
||||
@@ -1194,7 +1194,7 @@ CreateUserMapping(CreateUserMappingStmt *stmt)
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_OBJECT),
|
||||
errmsg("user mapping for \"%s\" already exists for server %s",
|
||||
errmsg("user mapping for \"%s\" already exists for server \"%s\"",
|
||||
MappingUserName(useId),
|
||||
stmt->servername)));
|
||||
}
|
||||
@@ -1294,8 +1294,8 @@ AlterUserMapping(AlterUserMappingStmt *stmt)
|
||||
if (!OidIsValid(umId))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("user mapping for \"%s\" does not exist for the server",
|
||||
MappingUserName(useId))));
|
||||
errmsg("user mapping for \"%s\" does not exist for server \"%s\"",
|
||||
MappingUserName(useId), stmt->servername)));
|
||||
|
||||
user_mapping_ddl_aclcheck(useId, srv->serverid, stmt->servername);
|
||||
|
||||
@@ -1396,7 +1396,9 @@ RemoveUserMapping(DropUserMappingStmt *stmt)
|
||||
errmsg("server \"%s\" does not exist",
|
||||
stmt->servername)));
|
||||
/* IF EXISTS, just note it */
|
||||
ereport(NOTICE, (errmsg("server does not exist, skipping")));
|
||||
ereport(NOTICE,
|
||||
(errmsg("server \"%s\" does not exist, skipping",
|
||||
stmt->servername)));
|
||||
return InvalidOid;
|
||||
}
|
||||
|
||||
@@ -1409,13 +1411,13 @@ RemoveUserMapping(DropUserMappingStmt *stmt)
|
||||
if (!stmt->missing_ok)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("user mapping for \"%s\" does not exist for the server",
|
||||
MappingUserName(useId))));
|
||||
errmsg("user mapping for \"%s\" does not exist for server \"%s\"",
|
||||
MappingUserName(useId), stmt->servername)));
|
||||
|
||||
/* IF EXISTS specified, just note it */
|
||||
ereport(NOTICE,
|
||||
(errmsg("user mapping for \"%s\" does not exist for the server, skipping",
|
||||
MappingUserName(useId))));
|
||||
(errmsg("user mapping for \"%s\" does not exist for server \"%s\", skipping",
|
||||
MappingUserName(useId), stmt->servername)));
|
||||
return InvalidOid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user