备份
pg_dump -h 127.0.0.1 -U postgres -d testdb > "C:\Users\honey\Desktop\testdb.bak"
pg_dump -h 127.0.0.1 -U postgres -d testdb -f "C:\Users\honey\Desktop\testdb.bak"
还原
psql -h 127.0.0.1 -U postgres -d testdb < "C:\Users\honey\Desktop\testdb.bak"
psql -h 127.0.0.1 -U postgres -d testdb -f "C:\Users\honey\Desktop\testdb.bak"
pg_dump -U username -W -s -t tablename
-s, --schema-only 只转储模式, 不包括数据
-t, --table=TABLE 只转储指定名称的表