postgresqlpostgresql-9.2pgadmin

Export and import table dump (.sql) using pgAdmin


I have pgAdmin version 1.16.1 installed on my machine.

For exporting a table dump, I do:

Right click on the table => Choose backup => Set Format to Plain => Save the file as some_name.sql

Then I remove the table.

Ok, now I need to import the backup I just created from some_name.sql into the database.

How am I supposed to do this? I can't find any clear instructions on how to import table's .sql dump into database using pgAdmin.

I'd appreciate some guidance.


Solution

    1. In pgAdmin, select the required target schema in object tree (databases ->your_db_name -> schemas -> your_target_schema)
    2. Click on Plugins/PSQL Console (in top-bar)
    3. Write \i /path/to/yourfile.sql
    4. Press enter