How to import existing *.sql files in PostgreSQL 8.4?

后端 未结 5 1857
悲哀的现实
悲哀的现实 2020-12-04 06:51

I am using PostgreSQL 8.4, and I have some *.sql files to import into a database. How can I do so?

5条回答
  •  甜味超标
    2020-12-04 07:05

    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.

提交回复
热议问题