|
After discussing with Sergei and Elena, we have decided to go with the addition of an extra column within INFORMATION_SCHEMA.APPLICABLE_ROLES. The column will be named IS_DEFAULT and feature a YES/NO value accordingly. The information within the INFORMATION_SCHEMA.APPLICABLE_ROLES matches well with this request.
Other possible approaches:
- A function to give the default role for the current user. This would require more parameters to work for other users except the current one.
- Modifying show grants to add an extra line there pointing to the default role. This is not 100% related to privileges so it does not match as good as adding the information within INFORMATION_SCHEMA.
- Separate syntax show default role for [user]. This seems to add unnecessary complexity to the grammar.
- Adding an extra variable. Users might try to set it, not considering it read only.
|