1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-10 14:22:35 +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:
Alvaro Herrera
2019-05-08 13:16:54 -04:00
parent df631ebc73
commit 61639816b8
3 changed files with 20 additions and 18 deletions

View File

@@ -238,9 +238,9 @@ CREATE SERVER s1 FOREIGN DATA WRAPPER foo;
COMMENT ON SERVER s1 IS 'foreign server';
CREATE USER MAPPING FOR current_user SERVER s1;
CREATE USER MAPPING FOR current_user SERVER s1; -- ERROR
ERROR: user mapping for "regress_foreign_data_user" already exists for server s1
ERROR: user mapping for "regress_foreign_data_user" already exists for server "s1"
CREATE USER MAPPING IF NOT EXISTS FOR current_user SERVER s1; -- NOTICE
NOTICE: user mapping for "regress_foreign_data_user" already exists for server s1, skipping
NOTICE: user mapping for "regress_foreign_data_user" already exists for server "s1", skipping
\dew+
List of foreign-data wrappers
Name | Owner | Handler | Validator | Access privileges | FDW options | Description
@@ -578,7 +578,7 @@ CREATE USER MAPPING FOR current_user SERVER s1; -- ERROR
ERROR: server "s1" does not exist
CREATE USER MAPPING FOR current_user SERVER s4;
CREATE USER MAPPING FOR user SERVER s4; -- ERROR duplicate
ERROR: user mapping for "regress_foreign_data_user" already exists for server s4
ERROR: user mapping for "regress_foreign_data_user" already exists for server "s4"
CREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this mapping" 'is public');
CREATE USER MAPPING FOR user SERVER s8 OPTIONS (username 'test', password 'secret'); -- ERROR
ERROR: invalid option "username"
@@ -618,7 +618,7 @@ ERROR: role "regress_test_missing_role" does not exist
ALTER USER MAPPING FOR user SERVER ss4 OPTIONS (gotcha 'true'); -- ERROR
ERROR: server "ss4" does not exist
ALTER USER MAPPING FOR public SERVER s5 OPTIONS (gotcha 'true'); -- ERROR
ERROR: user mapping for "public" does not exist for the server
ERROR: user mapping for "public" does not exist for server "s5"
ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (username 'test'); -- ERROR
ERROR: invalid option "username"
HINT: Valid options in this context are: user, password
@@ -648,13 +648,13 @@ ERROR: role "regress_test_missing_role" does not exist
DROP USER MAPPING FOR user SERVER ss4;
ERROR: server "ss4" does not exist
DROP USER MAPPING FOR public SERVER s7; -- ERROR
ERROR: user mapping for "public" does not exist for the server
ERROR: user mapping for "public" does not exist for server "s7"
DROP USER MAPPING IF EXISTS FOR regress_test_missing_role SERVER s4;
NOTICE: role "regress_test_missing_role" does not exist, skipping
DROP USER MAPPING IF EXISTS FOR user SERVER ss4;
NOTICE: server does not exist, skipping
NOTICE: server "ss4" does not exist, skipping
DROP USER MAPPING IF EXISTS FOR public SERVER s7;
NOTICE: user mapping for "public" does not exist for the server, skipping
NOTICE: user mapping for "public" does not exist for server "s7", skipping
CREATE USER MAPPING FOR public SERVER s8;
SET ROLE regress_test_role;
DROP USER MAPPING FOR public SERVER s8; -- ERROR