本文介绍了在桌面PostgreSQL中使用pg_read_file读取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 PostgreSQL 中使用 pg_read_file 在我的桌面上读取文件

我的查询

 选择pg_read_file('/ root / desktop / new.txt',0,1000000); 

错误

  ERROR:绝对路径不允许



my query

select pg_read_file('/root/desktop/new.txt' , 0 , 1000000);

error

ERROR:  absolute path not allowed
解决方案

If you're using psql you can use \lo_import to create a large object from a local file.

The pg_read_file tool only allows reads from server-side files.

这篇关于在桌面PostgreSQL中使用pg_read_file读取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 05:24