| 1 |
SQL Language Extension: SET ROLE |
| 2 |
|
| 3 |
Implements capability to change role in already establishment attachment. |
| 4 |
|
| 5 |
|
| 6 |
Author: |
| 7 |
Alex Peshkoff <[email protected]> |
| 8 |
|
| 9 |
|
| 10 |
Syntax is: |
| 11 |
|
| 12 |
SET ROLE rolename; |
| 13 |
SET TRUSTED ROLE; |
| 14 |
|
| 15 |
Description: |
| 16 |
|
| 17 |
Makes it possible to set current role to one, granted to current user, or to one assigned |
| 18 |
to database attachment as trusted. |
| 19 |
By default trusted role is not assigned to the attachment. This behavior can be changed using |
| 20 |
appropriate authentication plugin and CREATE/ALTER MAPPING command. Well know sample of |
| 21 |
trusted role is RDB$ADMIN assigned to windows admins when windows trusted authentication is |
| 22 |
used. |
| 23 |
|
| 24 |
Samples: |
| 25 |
|
| 26 |
SET ROLE manager; |
| 27 |
select current_role from rdb$database; |
| 28 |
|
| 29 |
Displays: |
| 30 |
|
| 31 |
ROLE |
| 32 |
=============================== |
| 33 |
MANAGER |