From 839cb0649a9f595a8534cdf14afbe89efb1757b1 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Mon, 20 Mar 2017 16:01:45 -0400 Subject: Use a consistent error message style for user mappings. User mappings are essentially anonymous, so messages referring to "user mapping foo on server bar" are wrong, and inconsistent with other error messages referring to user mappings. To be consistent with existing use, use "user mapping for foo on server bar" instead. I dropped the noise word "user" from the original suggestion to be consistent with other uses. Discussion: http://postgr.es/m/56c6f8ab-b2d6-f1fa-deb0-1d18cf67f7b9@2ndQuadrant.com --- src/backend/commands/foreigncmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/foreigncmds.c') diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c index d5d40e62392..7f551149d2d 100644 --- a/src/backend/commands/foreigncmds.c +++ b/src/backend/commands/foreigncmds.c @@ -1155,7 +1155,7 @@ CreateUserMapping(CreateUserMappingStmt *stmt) if (OidIsValid(umId)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("user mapping \"%s\" already exists for server %s", + errmsg("user mapping for \"%s\" already exists for server %s", MappingUserName(useId), stmt->servername))); @@ -1247,7 +1247,7 @@ AlterUserMapping(AlterUserMappingStmt *stmt) if (!OidIsValid(umId)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("user mapping \"%s\" does not exist for the server", + errmsg("user mapping for \"%s\" does not exist for the server", MappingUserName(useId)))); user_mapping_ddl_aclcheck(useId, srv->serverid, stmt->servername); @@ -1362,12 +1362,12 @@ RemoveUserMapping(DropUserMappingStmt *stmt) if (!stmt->missing_ok) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("user mapping \"%s\" does not exist for the server", + errmsg("user mapping for \"%s\" does not exist for the server", MappingUserName(useId)))); /* IF EXISTS specified, just note it */ ereport(NOTICE, - (errmsg("user mapping \"%s\" does not exist for the server, skipping", + (errmsg("user mapping for \"%s\" does not exist for the server, skipping", MappingUserName(useId)))); return InvalidOid; } -- cgit v1.2.3