SyntaxFix
Write A Post
Hire A Developer
Questions
Here is the command you are looking for.
psql -h hostname -d databasename -U username -f file.sql