Export Postgresql table data using pgAdmin
- Right-click on your table and pick option
Backup
.. - On File Options, set Filepath/Filename and pick
PLAIN
for Format - Ignore Dump Options #1 tab
- In Dump Options #2 tab, check
USE INSERT COMMANDS
- In Dump Options #2 tab, check
Use Column Inserts
if you want column names in your inserts. - Hit
Backup
button
Edit: In case you are using pgAdmin on a remote server: Once the UI announces the backup was successful, you might want to download the data. For this, follow these steps:
- Click on Tools (in the menu)
- Select Storage Manager
- Select the file that was just created
- Click on the small "Download File" button
Just right click on a table and select "backup". The popup will show various options, including "Format", select "plain" and you get plain SQL.
pgAdmin is just using pg_dump to create the dump, also when you want plain SQL.
It uses something like this:
pg_dump --user user --password --format=plain --table=tablename --inserts --attribute-inserts etc.