I have some application based on Qt library and using QPSQL driver.
In PostreSQL defined a few user roles (e.g: admin, operator, user). My application creates a connection to postgres server under specified user. How can I check the users role?
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- Django check user group permissions
- Django distinct is not working
- PostgreSQL: left outer join syntax
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- postgresql 关于使用between and 中是字符串的问题
- Qt槽函数自动执行多遍
- postgresql 月份差计算问题
- Using boolean expression in order by clause
- Table valued Parameter Equivalent in Postgresql
- in redshift postgresql can I skip columns with the
- Oracle equivalent of PostgreSQL INSERT…RETURNING *
You can check PostgreSQL user permissions with this query:
Per documentation:
That means,
session_user
shows the role you connected with, andcurrent_user
shows the role you are currently operating with, for instance after callingSET role some_other_role
.