1.数据的导出
pg_dump -U userName -t tableName -h IP databaseName > fileName.sql
如果postgresql不是安装在本地,则需要添加-h IP
2.数据的导入
psql -d databaseName -U userName -f fileName.sql
1.数据的导出
pg_dump -U userName -t tableName -h IP databaseName > fileName.sql
如果postgresql不是安装在本地,则需要添加-h IP
2.数据的导入
psql -d databaseName -U userName -f fileName.sql
转载于:https://my.oschina.net/maomaolsm/blog/881964