Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.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
函数pg_ls_dir()在postgresql 8.0.6中是如何工作的?_Postgresql - Fatal编程技术网

函数pg_ls_dir()在postgresql 8.0.6中是如何工作的?

函数pg_ls_dir()在postgresql 8.0.6中是如何工作的?,postgresql,Postgresql,瞧,我向数据库发送了这样一个请求 select pg_ls_dir('. . . /data/pg_log/') as files_dir; 我在这里得到了一个答案: ERROR: function pg_ls_dir("unknown") does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. 这里说我使用的p

瞧,我向数据库发送了这样一个请求

select pg_ls_dir('. . . /data/pg_log/') as files_dir;
我在这里得到了一个答案:

ERROR:  function pg_ls_dir("unknown") does not exist
HINT:  No function matches the given name and argument types. You may need to add explicit type casts.
这里说我使用的postgresql c(8.0.6)没有函数版本,有没有连接到所需函数的方法,或者其他方法甚至是目录中的文件?

postgresql 8.1中引入了
pg_ls_dir()
函数,因此它在8.0中不可用


您可以尝试手动将该功能添加到安装中,但我建议不要这样做。这是来源:

这是因为您使用的是旧版本的Postgres<代码>pg_ls_dir()出现在8.1版中


如果可能的话,我强烈建议您升级到最新版本(撰写本文时为9.3版),因为8.0版已经9年了,不再受支持。

您现在应该升级到最新的Postgres版本。8.0版(现在)已经有近10年的历史,并且已经有4年不受支持了。帮你自己一个忙,用一个更新的(受支持的)版本。谢谢你的回答。我想是佩雷赫特里特还是别的什么原因?我只需要从目录中读取日志文件,很遗憾我无法升级。谢谢您的回答。我想是佩雷赫特里特还是别的什么原因?我只需要从目录中读取日志文件,不幸的是我无法升级。@EbaaSd:我添加了一个到源代码的链接。您可以尝试添加函数,但这不是一个好主意。无论如何,你真的应该考虑升级到一个更新版本的Postgres