Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.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“;没有这样的文件或目录;_Postgresql_Postgis - Fatal编程技术网

Postgresql 创建和准备数据库postgres“;没有这样的文件或目录;

Postgresql 创建和准备数据库postgres“;没有这样的文件或目录;,postgresql,postgis,Postgresql,Postgis,在根据编写数据库的过程中,我总是收到错误消息C:/Program:在将psql-U postgres-d gis-f PATH\U写入\U postgres/share/contrib/postgis-1.5/postgis.sql之后,没有这样的文件或目录。在我的例子中,路径看起来像:C:\Program Files\PostgreSQL\9.3\share\contrib\postgis-2.1\postgis.sql 谢谢你的帮助或建议 psql -U postgres -d gis

在根据编写数据库的过程中,我总是收到错误消息C:/Program:在将
psql-U postgres-d gis-f PATH\U写入\U postgres/share/contrib/postgis-1.5/postgis.sql之后,没有这样的文件或目录。在我的例子中,路径看起来像:
C:\Program Files\PostgreSQL\9.3\share\contrib\postgis-2.1\postgis.sql
谢谢你的帮助或建议

psql -U postgres -d gis 
   -f "C:\Program Files\PostgreSQL\9.3\share\contrib\postgis-2.1\postgis.sql"

在这里,程序文件用空格分隔,因此需要在路径周围添加双引号

尝试引用您的路径或在路径中的空格前加一个“\”。我尝试在空格中添加“\”,但引用我的路径效果很好!非常感谢;)