Users, Roles, Privileges, and Sessions
The user access grants are organized by authorization groups.
sys.auths
| name | type | references | description |
|---|
| "id" | INTEGER | | The unique authorization identifier. |
| "name" | VARCHAR | | The SQL authorization name of the user or role. |
| "grantor" | INTEGER | sys.auths.id when grantor > 0 | The corresponding authorization grantor. |
sys.users
| name | type | references | description |
|---|
| "name" | VARCHAR | sys.auths.name | The unique user login name. |
| "fullname" | VARCHAR | | Full name of user. |
| "default_schema" | INTEGER | sys.schemas.id | The default schema for this user. |
| "schema_path" | VARCHAR | | The search path used to find database objects. |
| "max_memory" | BIGINT | | The maximum memory allowed for this user. 0 means no limit. |
| "max_workers" | INTEGER | | The maximum number of server worker threads allowed for this user. 0 means no limit. |
| "optimizer" | VARCHAR | sys.optimizers.name | The optimizer pipeline name. |
| "default_role" | INTEGER | sys.auths.id | The role authorization for this user. |
sys.db_user_info
sys.db_user_info can only be queried by users who have a select privilege on this table from monetdb.
| name | type | references | description |
|---|
| "name" | VARCHAR | sys.auths.name | The unique user login name. |
| "fullname" | VARCHAR | | Full name of user. |
| "default_schema" | INTEGER | sys.schemas.id | The default schema for this user. |
| "schema_path" | VARCHAR | | The search path used to find database objects. |
| "max_memory" | BIGINT | | The maximum memory allowed for this user. 0 means no limit. |
| "max_workers" | INTEGER | | The maximum number of server worker threads allowed for this user. 0 means no limit. |
| "optimizer" | VARCHAR | sys.optimizers.name | The optimizer pipeline name. |
| "default_role" | INTEGER | sys.auths.id | The role authorization for this user. |
| "password" | VARCHAR | | Encrypted password. |
sys.roles
| name | type | references | description |
|---|
| "id" | INTEGER | | The unique role identifier. |
| "name" | VARCHAR | | The role name. |
| "grantor" | INTEGER | sys.auths.id when grantor > 0 | The corresponding authorization grantor. |
sys.user_role
| name | type | references | description |
|---|
| "login_id" | INTEGER | sys.auths.id | The corresponding user identifier. |
| "role_id" | INTEGER | sys.roles.id | The corresponding role identifier. |
sys.privileges
| name | type | references | description |
|---|
| "obj_id" | INTEGER | sys.ids.id | The identifier of the object for which privilege(s) are given to a certain user or role. |
| "auth_id" | INTEGER | sys.auths.id | The id of the user or role. |
| "privileges" | INTEGER | sys.privilege_codes.privilege_code_id | Privileges classification code, see table sys.privilege_codes. |
| "grantor" | INTEGER | sys.auths.id when grantor > 0 | The corresponding grantor authorization identifier. |
| "grantable" | INTEGER | | Permission to pass privilege rights to other users or roles. |
sys.privilege_codes
| name | type | references | description |
|---|
| "privilege_code_id" | INTEGER | | The unique internal code of a privilege or combination of privileges. |
| "privilege_code_name" | VARCHAR | | A description of the privilege(s) associated with this code. |
sys.sessions
| name | type | references | description |
|---|
| "sessionid" | INTEGER | | The internal session identifier. |
| "username" | VARCHAR | sys.users.name | The name of the login user who created the session. |
| "login" | TIMESTAMP | | The login start timestamp of the session. |
| "idle" | TIMESTAMP | | The idle timestamp of the session. |
| "optimizer" | VARCHAR | sys.optimizers.name | The optimizer pipeline name. |
| "sessiontimeout" | INTEGER | | The session timeout time in milliseconds, 0 means timeout is disabled. |
| "querytimeout" | INTEGER | | The query execution timeout time in milliseconds, 0 means timeout is disabled. |
| "workerlimit" | INTEGER | | The maximum number of worker threads allowed, 0 means limit is disabled. |
| "memorylimit" | INTEGER | | The memory limit in MB for this session, 0 means limit is disabled. |
| "language" | VARCHAR | | The language (either sql or mal) used by this session. |
| "peer" | VARCHAR | | The IP address and port number (or alternatively Unix socket) of the application which started this session. |
| "hostname" | VARCHAR | | The hostname of the application which started this session. |
| "application" | VARCHAR | | The name of the application which started this session. |
| "client" | VARCHAR | | The name of the client library used to start this session. |
| "clientpid" | BIGINT | | The process id (on the host os) of the application which started this session. |
| "remark" | VARCHAR | | A remark text which the client application can set. |
sys.clientinfo_properties
| name | type | references | description |
|---|
| "prop" | VARCHAR | | The unique name of the supported client info property. To be used as first arg of function sys.setclientinfo(property string, value string). |
| "session_attr" | VARCHAR | | The associated name of the column in the sys.sessions view. |