Reputation: 108
How can I get a full list of schemas in known database Postgresql in pg_dump utility to backup each schema in a separate file?
Now I use it in this way:
# pg_dump my_database
Upvotes: 1
Views: 1566
Reputation: 8623
Try
psql -c "select schema_name from information_schema.schemata" -At
to return just the names, i.e., suitable for shell scripting.
Upvotes: 2