如果我尝试导入一个SQL脚本与path中的空间,找不到文件。
mypsqluser=> \i /home/markus/Documents/Projekte/My App/Installation/server_sql_script.sql /home/markus/Documents/Projekte/My: No such file or directory
我试图用反斜杠,双反斜杠或引号来逃避它,但也不起作用,请参阅:
mypsqluser=> \i /home/markus/Documents/Projekte/My\ App/Installation/server_sql_script.sql /home/markus/Documents/Projekte/My: No such file or directory mypsqluser=> \i "/home/markus/Documents/Projekte/My App/Installation/server_sql_script.sql" "/home/markus/Documents/Projekte/My App/Installation/server_sql_script.sql": No such file or directory
它只有在path中没有空格时才起作用。 但是如何处理空间呢?
单引号就可以做到; 转义空间然后是可选的:\ i'/ home / markus / Documents / Projekte / My \ App / Installation / server_sql_script.sql'