linux - "pg_restore"或附近的 Postgresql 错误语法错误

标签 linux postgresql ubuntu

我在“pg_restore”处或附近遇到语法错误:

pg_restore -i -h localhost -p 5432 -U postgres -d old_db -v 

最佳答案

发件人:https://www.reddit.com/r/PostgreSQL/comments/e6ezai/getting_a_syntax_error_when_trying_to_restore/
这意味着您正在从 psql 中运行 pg_restore。但是 pg_restore 是一个命令行程序(不是 SQL 命令),就像 psql.exe(或 createdb.exe 或 cmd.exe)一样,所以你需要在命令行上运行它,而不是在 psql 中。

关于linux - "pg_restore"或附近的 Postgresql 错误语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42231846/

相关文章:

python - ctypes 结构,字节对齐

linux - updatedb 命令似乎没有更新 slocate.db

php - UBUNTU 11.04 + PHP + POSTGRESQL 增强性能

python - 如何确保脚本始终使用cron运行?

linux - 如何用 bash 语言执行命令并检查其结果

postgresql - 用于缓存的 Heroku Postgres RAM 与 Memcache RAM

ruby-on-rails - 使用 pluck 对关联表 ruby​​ 按计数排序

linux - 绑定(bind)ip到子域

sql - sybase更新越来越慢

mysql - 目录、模式、用户和数据库实例之间的关系