PostgreSQL:如何在用户级别设置 search_path?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2951875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 22:33:00 来源:igfitidea点击:
PostgreSQL: How do I set the search_path at the user level?
提问by Jin Kim
I want to set the default search_path to something other than the "public" schema. But I only want to do this for a particular user. How can I accomplish this?
我想将默认 search_path 设置为“公共”模式以外的其他内容。但我只想为特定用户执行此操作。我怎样才能做到这一点?
回答by Jin Kim
I found the answer:
我找到了答案:
ALTER ROLE username SET search_path = schema1,schema2,schema3,etc;