postgresql 导出数据库与数据表

单表导出

pg_dump --host 127.0.0.1 --port 5432 --username "postgres" --role "postgres" --file "D:/test.sql" --table "public.\"表名\"" "数据库名"

单表导入

psql  -h localhost -p 5432  -U postgres -d beijing -f test.sql

猜你喜欢

转载自www.cnblogs.com/gisdataunion/p/12808805.html