Redshift Notes

From Federal Burro of Information
Jump to navigationJump to search

get all schemas:

echo "select nspname from pg_namespace where nspowner = 100;" | psql -t -A > list_of_user_schemas.txt

dump each schema

for i in `cat list_of_user_schemas.txt`; do echo $i; pg_dump -s -n $i > $i.schema; done