postgresql指定数据库执行sql脚本文件
目的:postgresql通过脚本给指定数据库执行sql脚本文件,用于执行升级脚本、更新数据、数据库还原等场景。./psql -U postgres-d 库名-p 5432 -f备份文件.sql。
·
目的:postgresql通过脚本给指定数据库执行sql脚本文件,用于执行升级脚本、更新数据、数据库还原等场景
./psql -U postgres -d 库名 -p 5432 -f 备份文件.sql
./psql -U postgres -d work_business -p 5432 -f /opt/data/sql/20240423/work_business-20240423.sql
更多推荐




所有评论(0)