From f672ce5d77d60f0422a6eae6c7db56e00a52eaec Mon Sep 17 00:00:00 2001 From: Shigeru Hanada Date: Mon, 4 Apr 2011 19:25:22 +0900 Subject: [PATCH 3/5] Document about COMMENT ON USER MAPPING. --- doc/src/sgml/ref/comment.sgml | 30 ++++++++++++++++++++++++++++++ doc/src/sgml/ref/grant.sgml | 2 +- 2 files changed, 31 insertions(+), 1 deletions(-) diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml index 1cdc49f..c03691a 100644 --- a/doc/src/sgml/ref/comment.sgml +++ b/doc/src/sgml/ref/comment.sgml @@ -54,6 +54,7 @@ COMMENT ON TEXT SEARCH TEMPLATE object_name | TRIGGER trigger_name ON table_name | TYPE object_name | + USER MAPPING FOR { user_name | USER | CURRENT_USER | PUBLIC } SERVER server_name | VIEW object_name } IS 'text' @@ -78,6 +79,10 @@ COMMENT ON Roles don't have owners, so the rule for COMMENT ON ROLE is that you must be superuser to comment on a superuser role, or have the CREATEROLE privilege to comment on non-superuser roles. + User mappings don't have owners, so the rule for COMMENT ON USER + MAPPING is that the owner of a foreign server can comment on user + mappings for the server for any user. In adittion, user who is granted + USAGE privilege on the SERVER can set the comment on his own mapping. Of course, a superuser can comment on anything. @@ -213,6 +218,30 @@ COMMENT ON + user_name + USER + CURRENT_USER + PUBLIC + + + The name of the user of the target user mapping. + CURRENT_USER and USER match the + name of the current user. PUBLIC is used to match all + present and future user names in the system. + + + + + + server_name + + + The name of the server of the target user mapping. + + + + + text @@ -288,6 +317,7 @@ COMMENT ON TEXT SEARCH PARSER my_parser IS 'Splits text into words'; COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer'; COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI'; COMMENT ON TYPE complex IS 'Complex number data type'; +COMMENT ON USER MAPPING FOR PUBLIC SERVER my_server IS 'Default mapping'; COMMENT ON VIEW my_view IS 'View of departmental costs'; diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml index 72ecc45..6a934d6 100644 --- a/doc/src/sgml/ref/grant.sgml +++ b/doc/src/sgml/ref/grant.sgml @@ -340,7 +340,7 @@ GRANT role_name [, ...] TO For servers, this privilege enables the grantee to create, - alter, and drop his own user's user mappings associated with + alter, drop and comment his own user's user mappings associated with that server. Also, it enables the grantee to query the options of the server and associated user mappings. -- 1.7.3