Import PostgreSQL Script Files |
[SQL Server to PostgreSQL] [MySQL to PostgreSQL] [Oracle to PostgreSQL] |
This article explains how to move dump file contents to PostgreSQL server using the most popular tools.
PostgreSQL console client (psql)
Syntax of the command line depends on the structure of the dump file. If the dump file contains 'CREATE DATABASE' statement you should call the tool as follows:
psql -h hostname -U username -f {SQL script file name}
Otherwise:
psql -h hostname -d databasename -U username -f {SQL script file name}
Of course you need to replace parameters in figure brackets {...} by actual values.
phpPgAdmin
To import SQL script file into PostgreSQL database using this tool, take the following steps:
Have questions? Contact us