Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
postgresql:您可以在pgAdmin中作为指定角色运行查询吗?_Sql_Postgresql_Pgadmin 4 - Fatal编程技术网

postgresql:您可以在pgAdmin中作为指定角色运行查询吗?

postgresql:您可以在pgAdmin中作为指定角色运行查询吗?,sql,postgresql,pgadmin-4,Sql,Postgresql,Pgadmin 4,如果您自己有管理员或root访问权限,是否可以: 通过set\u config()设置一些变量,然后 在pgAdmin中作为指定角色运行查询,查看该特定角色的结果是什么 例如,暂时做如下事情: select set_config('mytokenvar', 123, true); select * from foo.bar as role registered_user; 然后查看它是否适用于该角色,然后从会话中清除设置和角色 我使用的是pgAdmin 4.4.17您可以在执行查询之前运行设置

如果您自己有管理员或root访问权限,是否可以:

  • 通过
    set\u config()
    设置一些变量,然后
  • 在pgAdmin中作为指定角色运行查询,查看该特定角色的结果是什么
  • 例如,暂时做如下事情:

    select set_config('mytokenvar', 123, true);
    select * from foo.bar as role registered_user;
    
    然后查看它是否适用于该角色,然后从会话中清除设置和角色


    我使用的是pgAdmin 4.4.17

    您可以在执行查询之前运行
    设置角色…
    。@a_horse_和_no_name一起工作!!谢谢-D