導出結構
/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -s --no-tablespaces -f if_create_obj.sql
導出數據
- copy形式
/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -a --no-tablespaces -f if_init.sql
- insert語句形式(通過添加–inserts選項)
/home/postgres/pgsql/bin/pg_dump -Upostgres -d if -a --no-tablespaces --inserts -f if_init.sql