Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.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 在postgres中正确设置角色的语句\u超时_Postgresql - Fatal编程技术网

Postgresql 在postgres中正确设置角色的语句\u超时

Postgresql 在postgres中正确设置角色的语句\u超时,postgresql,Postgresql,将语句\u timeout分配给postgres中的角色似乎不会保持该设置 例如: --设置角色的语句\u超时 alter role api_user set语句_超时='500ms'; --启动交易 开始; --担任 设置角色api_用户; --显示语句\u超时设置 显示语句超时; -- |--------------------------| --|语句_超时(文本)| -- |--------------------------| -- | 0

语句\u timeout
分配给postgres中的角色似乎不会保持该设置

例如:

--设置角色的语句\u超时
alter role api_user set语句_超时='500ms';
--启动交易
开始;
--担任
设置角色api_用户;
--显示语句\u超时设置
显示语句超时;
-- |--------------------------|
--|语句_超时(文本)|
-- |--------------------------|
-- | 0                        |
-- |--------------------------|
由于
api\u用户
statement\u timeout
被设置为500ms,我希望
500ms
作为输出。相反,它显示默认的
语句\u timeout
为0,或不受限制


这里缺少什么?

会话被持久化,但假设角色具有
设置角色
设置会话授权
不会设置参数。为此,您必须以role
api\u user
的身份登录数据库