Having a sup_user and a normal_user, login with sup_user
select session_user, current_user sup_user, sup_user
set role normal_user;
select session_user, current_user
sup_user, normal_user
But then, when sup_user was running with normal_user grants an exception occurs
select * from Some_Schema.Some_Table;
I was running with SET ROLE NORMAL_USER but I cannot see that info on LOG
user_name;error_severity;message
sup_user;ERROR;permission denied for schema Some_Schema
Would be good to have on LOG session_user / current_user if they differ, what do you think ?
Which one is better
- Put session_user / current_user on same %u prefix and fill current_user only if it differs from session_user ?
- Create another prefix for it, %o for example
thanks,
Marcos