Bigzhu's den

postgresql 导入不同 schema

bigzhu

没法直接导入, 但是可以改 schema 名, 然后导入, 再改回来.

导入

pg_restore -h 139.129.129.230 --password -U fc2 -d fc2 -v fc.20171118.dump

改名

alter schema public rename to public_save;

建立新的 public schema

create schema public;
grant usage on schema public to public;
grant create on schema public to public;
bigzhu
Everything is learnable