开发者

Postgresql pg_dump, doesnt work well on dumping and restore schema

开发者 https://www.devze.com 2023-01-12 01:35 出处:网络
I use code belows for dump a specific 开发者_如何学JAVAschema, before dumped it has 4 views on those schema.

I use code belows for dump a specific 开发者_如何学JAVAschema, before dumped it has 4 views on those schema.

# pg_dump -U username -h host -n schema_name > some_schema.dump

Then I restore it with psql tools

# \i /path/to/mydump/some_schema.dump

After psql finish his restore process , i just only got 3 views, i have no idea where the 1 views go. i use postgresql 8.3 on ubuntu karmic.

Thanks.


Are you sure it has 4 views? Or is it that your search_path is set to this schema as well, but the view is actualy in another schema?

SELECT * FROM pg_views WHERE schemaname = 'your_schemaname';
0

精彩评论

暂无评论...
验证码 换一张
取 消