我一直在尝试导入一个postgres转储(使用psql dbname < dump.sql
及其变体,指定主机名和用户名等),但到目前为止我一直没有成功。PostgreSQL导入不起作用
我是Postgres的新手,所以我可能在这里忽略了一些明显的问题。根据导入命令的输出,扩展plpgsql可能不存在。我希望在导入之前设置plpgsql扩展名?
以下是输出的前几行:
SET
ERROR: unrecognized configuration parameter "lock_timeout"
SET
SET
SET
SET
CREATE EXTENSION
ERROR: must be owner of extension plpgsql
ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
ERROR: extension "hstore" does not exist
SET
SET
SET
ERROR: relation "active_admin_comments" already exists
ERROR: role "finalstep" does not exist
ERROR: relation "active_admin_comments_id_seq" already exists
ERROR: role "finalstep" does not exist
ALTER SEQUENCE
ERROR: relation "admin_users" already exists
ERROR: role "finalstep" does not exist
后来在路上,它看起来像它试图执行一些内容为SQL查询(内容包含MATHML标签)的:
ERROR: syntax error at or near "</"
LINE 1: </mo> <msqrt>
^
ERROR: syntax error at or near "&"
LINE 1:
^
ERROR: syntax error at or near "</"
LINE 1: </mi> <mi>α
任何指针?我的Postgres版本是9.1(最初是9.3,但在看到错误信息后我将它降级到了9.1)。
感谢您的帮助,固定-dbname错字。切换到9.3,它解决了一些问题。安装postgres-contrib-9.3,但问题仍然存在。我正在尝试一些事情,我会回到这里来发布我的进度。 – Soumendra