问题描述
我在 ubuntu 服务器上有一个 postgres 数据库。 psql --version
的输出是
psql (Postgresql) 10.15 (Ubuntu 10.15-0ubuntu0.18.04.1)
。我使用命令创建了这个数据库的转储
pg_dump -U curIoUslearn -h localhost -p 5432 -Fc -f mydb.dump mydb
然后我将文件复制到我的本地机器(运行 Mac OSX)并具有 postgres 版本
psql (Postgresql) 13.2
。
- 我使用
createdb mydbtest
创建数据库。 - 然后,我使用
psql -d mydbtest
连接到数据库。 - 我运行
DROP SCHEMA IF EXISTS PUBLIC;
(如果我不这样做,我会收到一条错误消息,指出架构 public 已经存在)。 - 我运行命令:
pg_restore --no-owner --no-privileges -d mydbtest mydb.dump
我的问题是出现以下错误。你能建议如何修复它们吗?谢谢你。我搜索了很多,但 "$libdir/hstore"
的结果并不多。没有什么是有帮助的。如果你能想到一些事情,我可以尝试。谢谢。
pg_restore: from TOC entry 2; 3079 18199 EXTENSION hstore
pg_restore: error: Could not execute query: ERROR: Could not access file "$libdir/hstore": No such file or directory
Command was: CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
pg_restore: from TOC entry 3061; 0 0 COMMENT EXTENSION hstore
pg_restore: error: Could not execute query: ERROR: extension "hstore" does not exist
Command was: COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key,value) pairs';
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)