DB/Postgresql
쉘스크립트로 sql파일들 여러개 실행하기
fabxoe
2020. 4. 28. 00:05
#!/bin/bash
for f in *.sql;
do
psql -U postgres -d postgres -f "$f"
done
echo "sql runner complete";
https://stackoverflow.com/questions/13062168/how-to-execute-multiple-sql-files-in-postgresql-linux
How to execute multiple sql files in postgreSQL linux?
I have many .sql files in a folder (/home/myHSH/scripts) in linux debian. I want to know the command to execute or run all sql files inside the folder into postgreSQL v9.1 database. PostgreSQL
stackoverflow.com