mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Improve wording for privilege description on certain failure messages; the
original misleadingly suggests that only access is meant, causing confusion. Per recent trouble report by Robert McGehee on pgsql-admin.
This commit is contained in:
parent
3a1b51de19
commit
7788b76acd
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_shdepend.c,v 1.44 2010/07/28 05:22:24 sriggs Exp $
|
* $PostgreSQL: pgsql/src/backend/catalog/pg_shdepend.c,v 1.45 2010/08/26 19:49:08 alvherre Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1067,7 +1067,7 @@ storeObjectDescription(StringInfo descs, objectType type,
|
|||||||
if (deptype == SHARED_DEPENDENCY_OWNER)
|
if (deptype == SHARED_DEPENDENCY_OWNER)
|
||||||
appendStringInfo(descs, _("owner of %s"), objdesc);
|
appendStringInfo(descs, _("owner of %s"), objdesc);
|
||||||
else if (deptype == SHARED_DEPENDENCY_ACL)
|
else if (deptype == SHARED_DEPENDENCY_ACL)
|
||||||
appendStringInfo(descs, _("access to %s"), objdesc);
|
appendStringInfo(descs, _("privileges for %s"), objdesc);
|
||||||
else
|
else
|
||||||
elog(ERROR, "unrecognized dependency type: %d",
|
elog(ERROR, "unrecognized dependency type: %d",
|
||||||
(int) deptype);
|
(int) deptype);
|
||||||
|
@ -13,10 +13,10 @@ GRANT ALL ON TABLE deptest TO regression_user, regression_user2;
|
|||||||
-- can't drop neither because they have privileges somewhere
|
-- can't drop neither because they have privileges somewhere
|
||||||
DROP USER regression_user;
|
DROP USER regression_user;
|
||||||
ERROR: role "regression_user" cannot be dropped because some objects depend on it
|
ERROR: role "regression_user" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to table deptest
|
DETAIL: privileges for table deptest
|
||||||
DROP GROUP regression_group;
|
DROP GROUP regression_group;
|
||||||
ERROR: role "regression_group" cannot be dropped because some objects depend on it
|
ERROR: role "regression_group" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to table deptest
|
DETAIL: privileges for table deptest
|
||||||
-- if we revoke the privileges we can drop the group
|
-- if we revoke the privileges we can drop the group
|
||||||
REVOKE SELECT ON deptest FROM GROUP regression_group;
|
REVOKE SELECT ON deptest FROM GROUP regression_group;
|
||||||
DROP GROUP regression_group;
|
DROP GROUP regression_group;
|
||||||
@ -24,7 +24,7 @@ DROP GROUP regression_group;
|
|||||||
REVOKE SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES ON deptest FROM regression_user;
|
REVOKE SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES ON deptest FROM regression_user;
|
||||||
DROP USER regression_user;
|
DROP USER regression_user;
|
||||||
ERROR: role "regression_user" cannot be dropped because some objects depend on it
|
ERROR: role "regression_user" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to table deptest
|
DETAIL: privileges for table deptest
|
||||||
-- now we are OK to drop him
|
-- now we are OK to drop him
|
||||||
REVOKE TRIGGER ON deptest FROM regression_user;
|
REVOKE TRIGGER ON deptest FROM regression_user;
|
||||||
DROP USER regression_user;
|
DROP USER regression_user;
|
||||||
@ -110,7 +110,7 @@ REASSIGN OWNED BY regression_user1 TO regression_user2;
|
|||||||
-- doesn't work: grant still exists
|
-- doesn't work: grant still exists
|
||||||
DROP USER regression_user1;
|
DROP USER regression_user1;
|
||||||
ERROR: role "regression_user1" cannot be dropped because some objects depend on it
|
ERROR: role "regression_user1" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to table deptest1
|
DETAIL: privileges for table deptest1
|
||||||
DROP OWNED BY regression_user1;
|
DROP OWNED BY regression_user1;
|
||||||
DROP USER regression_user1;
|
DROP USER regression_user1;
|
||||||
\set VERBOSITY terse
|
\set VERBOSITY terse
|
||||||
|
@ -412,7 +412,7 @@ RESET ROLE;
|
|||||||
DROP ROLE regress_test_indirect; -- ERROR
|
DROP ROLE regress_test_indirect; -- ERROR
|
||||||
ERROR: role "regress_test_indirect" cannot be dropped because some objects depend on it
|
ERROR: role "regress_test_indirect" cannot be dropped because some objects depend on it
|
||||||
DETAIL: owner of server s1
|
DETAIL: owner of server s1
|
||||||
access to foreign-data wrapper foo
|
privileges for foreign-data wrapper foo
|
||||||
\des+
|
\des+
|
||||||
List of foreign servers
|
List of foreign servers
|
||||||
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
|
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
|
||||||
@ -941,8 +941,8 @@ RESET ROLE;
|
|||||||
-- Cleanup
|
-- Cleanup
|
||||||
DROP ROLE regress_test_role; -- ERROR
|
DROP ROLE regress_test_role; -- ERROR
|
||||||
ERROR: role "regress_test_role" cannot be dropped because some objects depend on it
|
ERROR: role "regress_test_role" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to server s4
|
DETAIL: privileges for server s4
|
||||||
access to foreign-data wrapper foo
|
privileges for foreign-data wrapper foo
|
||||||
owner of user mapping for regress_test_role
|
owner of user mapping for regress_test_role
|
||||||
owner of user mapping for regress_test_role
|
owner of user mapping for regress_test_role
|
||||||
owner of server s5
|
owner of server s5
|
||||||
@ -968,7 +968,7 @@ DROP ROLE regress_test_indirect;
|
|||||||
DROP ROLE regress_test_role;
|
DROP ROLE regress_test_role;
|
||||||
DROP ROLE unprivileged_role; -- ERROR
|
DROP ROLE unprivileged_role; -- ERROR
|
||||||
ERROR: role "unprivileged_role" cannot be dropped because some objects depend on it
|
ERROR: role "unprivileged_role" cannot be dropped because some objects depend on it
|
||||||
DETAIL: access to foreign-data wrapper postgresql
|
DETAIL: privileges for foreign-data wrapper postgresql
|
||||||
REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM unprivileged_role;
|
REVOKE ALL ON FOREIGN DATA WRAPPER postgresql FROM unprivileged_role;
|
||||||
DROP ROLE unprivileged_role;
|
DROP ROLE unprivileged_role;
|
||||||
DROP ROLE regress_test_role2;
|
DROP ROLE regress_test_role2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user