psql 额外的命令行参数

psql extra command line argument

有人能告诉我为什么我在这里得到错误的额外命令行参数吗?当我使用 -f 并为其提供 sql 文件的完整路径时,它工作正常。我想改用相对路径,所以我尝试使用 \ir 命令。

psql -c \c postgresql://docker:1234/nbt?ssl=true -U admin -v username='user73291' -v recipeId=2 -c \ir '../../../resources/sql/myfile.sql'

错误:

psql: warning: extra command-line argument "../../../resources/sql/myfile.sql" ignored
ERROR:  syntax error at or near "ir"
LINE 1: ir
    ^

谢谢!

\i 是在 psql 命令行中使用的元命令,而不是在 shell 命令行中。 -f有什么问题?