Brain90
Brain90

Reputation: 1694

Postgresql pg_dump, doesnt work well on dumping and restore schema

I use code belows for dump a specific schema, 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.

Upvotes: 0

Views: 877

Answers (1)

Frank Heikens
Frank Heikens

Reputation: 127086

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';

Upvotes: 1

Related Questions