Applied suggestions from code review

This commit is contained in:
adevyatova 2021-08-04 15:11:42 +03:00
parent 82721d593e
commit 48c14fae6f
2 changed files with 4 additions and 4 deletions

View File

@ -2140,7 +2140,7 @@ Result:
## currentRoles {#current-roles}
Returns the names of the roles which are current for the current user. The command [SET ROLE](../../sql-reference/statements/set-role.md#set-role-statement) could be used to change the current roles, by default the current roles are returned by the function [defaultRoles](#default-roles) called when the current user logins.
Returns the names of the roles which are current for the current user. The command [SET ROLE](../../sql-reference/statements/set-role.md#set-role-statement) could be used to change the current roles. If the command `SET ROLE` hasn't been used the function `currentRoles` returns the same as `defaultRoles`.
**Syntax**
@ -2172,7 +2172,7 @@ Type: [Array](../../sql-reference/data-types/array.md)([String](../../sql-refere
## defaultRoles {#default-roles}
Returns the names of the roles which are set as current when the user logins. The command [SET DEFAULT ROLE](../../sql-reference/statements/set-role.md#set-default-role-statement) could be used to change the default roles. By default are all the roles which are granted to a user.
Returns the names of the roles which are set as current when the current user logins. The command [SET DEFAULT ROLE](../../sql-reference/statements/set-role.md#set-default-role-statement) could be used to change the default roles. By default the default roles are all the roles granted to the current user.
**Syntax**

View File

@ -2090,7 +2090,7 @@ SELECT tcpPort();
## currentRoles {#current-roles}
Возвращает имена текущих ролей для текущего пользователя. Для изменения текущих ролей может использоваться команда [SET ROLE](../../sql-reference/statements/set-role.md#set-role-statement). Текущие роли по умолчанию можно получить при вызове функции [defaultRoles](#default-roles), когда пользователь входит в систему.
Возвращает имена текущих ролей для текущего пользователя. Для изменения текущих ролей может использоваться команда [SET ROLE](../../sql-reference/statements/set-role.md#set-role-statement). Если команда `SET ROLE` не использовалась, функция возвращает тот же результат, что и функция [defaultRoles](#default-roles).
**Синтаксис**
@ -2122,7 +2122,7 @@ enabledRoles()
## defaultRoles {#default-roles}
Возвращает имена ролей, которые задаются как текущие для данного пользователя, когда он входит в систему. Они могут быть изменены при помощи команды [SET DEFAULT ROLE](../../sql-reference/statements/set-role.md#set-default-role-statement), но по умолчанию это все роли, которые предоставляются пользователю.
Возвращает имена ролей, которые задаются как текущие для данного пользователя при входе в систему. Они могут быть изменены при помощи команды [SET DEFAULT ROLE](../../sql-reference/statements/set-role.md#set-default-role-statement). По умолчанию это все роли, которые разрешено использовать текущему пользователю (см. команду [GRANT](../../sql-reference/statements/grant/#grant-select)).
**Синтаксис**