【问题标题】:pgAdmin launches pg_restore with invalid database namepgAdmin 使用无效的数据库名称启动 pg_restore
【发布时间】:2011-05-23 08:48:43
【问题描述】:

在 Ubuntu 11.04 64 位上新安装 PostgreSQL 和 pgAdmin。

在使用 pgAdmin 恢复数据库架构时,它会启动以下命令:

/usr/bin/pg_restore --host opusdb --port 5432 --username postgres --dbname \"mydb\" --verbose "mydb.backup"
pg_restore: connecting to database for restore
pg_restore: [archiver (db)] connection to database ""mydb"" failed: FATAL:  database ""mydb"" does not exist
pg_restore: *** aborted because of error

Process returned exit code 1.

问题是由于数据库名称前后的\"。以下在命令行上工作(注意缺少\字符):

/usr/bin/pg_restore --host opusdb --port 5432 --username postgres --dbname "mydb" --verbose "mydb.backup"

不确定 pgAdmin 是否突然使用了不同的语法,或者 pg_restore 不再理解 \"。这可能与 Ubuntu 的 64 位安装有任何关系吗?

【问题讨论】:

    标签: postgresql pgadmin


    【解决方案1】:

    显然这是特定 pgadmin3 版本的问题:osdir.com/ml/ubuntu-bugs/2011-05/msg30089.html

    下个版本应该不会有这个问题了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-28
      • 2018-01-29
      • 1970-01-01
      • 1970-01-01
      • 2014-03-13
      • 2011-03-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多