Postgres以非超级用户身份复制到文件/从文件复制 [英] Postgres COPY TO / FROM A FILE as non superuser
本文介绍了Postgres以非超级用户身份复制到文件/从文件复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
im试图创建一个任何用户都可以调用以将数据从文件复制到文件的函数...我的想法是设置一个充当超级用户或执行为 postgres的函数,但是我
im trying to create a function that any user can call in order to copy data from/to a file... my idea is to set a function that acts as a superuser or one that is executed as "postgres" but I dont know were to start to begin with.
有人能指出我正确的方向吗?
Can anyone point me in the right direction?
推荐答案
您正在寻找安全定义器。有关详细信息,请参阅文档 http://www.postgresql.org/docs/9.3 /static/sql-createfunction.html
You're looking for "SECURITY DEFINER". See docs for details http://www.postgresql.org/docs/9.3/static/sql-createfunction.html
这篇关于Postgres以非超级用户身份复制到文件/从文件复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文