I am using PostgreSQL 8.4, and I have some *.sql files to import into a database. How can I do so?
Always preferred using a connection service file (lookup/google 'psql connection service file')
Then simply:
psql service={yourservicename} < {myfile.sql}
Where yourservicename is a section name from the service file.
yourservicename