在psql中运行批处理文件时出错(使用-f但不使用<)

时间:2016-12-29 15:58:47

标签: psql

我的命令提示符具有以下结构:

psql -d databasename -h hostname -p portnumber -U username -w -f batchfile\location\here

我收到以下错误:

ERROR: syntax error at or near "ï>>¿"
LINE 1: ï>>¿

这会导致批处理中的第一个sql查询无法运行。

使用<执行批处理文件时似乎没有任何问题。见下面的例子:

psql -d databasename -h hostname -p portnumber -U username -w < batchfile\location\here

我正在运行postgreSQL版本8.2.15。

在使用-f时,命令行或sql批处理中是否存在某些内容?提前谢谢!

0 个答案:

没有答案
相关问题