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

posted @ 2020-04-30 14:45  时空数据派  阅读(807)  评论(1)    收藏  举报