postgresql 怎么把库的全部权限授权给其他人?
grant all on schema information_schema to username;grant usage on schema information_schema to username;grant usage on schema pg_catalog to username;
参考PG官方文档,“库”:database的权限包括CTc,对默认public角色具有Tc权限,所以单指database的所有权限,只需单独赋予大C(create)权限给其他用户即可,例如
grant create on DATABASE postgres to your_user;
如果是要把database下所有schema下的所有对象(包括表、视图等)权限赋予给其他用户,则不可以,权限设置不能跨层级进行设置。