要在Linux上的PostgreSQL中导入SQL文件,可以使用psql命令行工具:
psql -h hostname/ip -U username -d dbname -f file.sql
其中:
- -h:指定服务器主机名或IP地址
- -U:PostgreSQL的用户名
- -d:要导入数据的数据库名
- -f:包含SQL命令的文件路径
输入密码即可执行导入
要在Linux上的PostgreSQL中导入SQL文件,可以使用psql命令行工具:
psql -h hostname/ip -U username -d dbname -f file.sql
其中:
输入密码即可执行导入