我在終端上試過:
psql -d test < .\backup_database.sql
At line:1 char:14
psql -d test < .\backup_database.sql
~
The '<' operator is reserved for future use.
CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : RedirectionNotSupported
pg_dump命令在終端上無縫運行。那么我在哪里運行psql命令。試過dbshell- 不作業,手動添加pgadmin 4給出pg_restore: error: input file appears to be a text format dump. Please use psql.
uj5u.com熱心網友回復:
在 Windows 上不要使用重定向,使用-f引數傳遞要運行的檔案:
psql -d test -f backup_database.sql
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/373550.html
標籤:视窗 PostgreSQL的 psql
