I have a database in which I scraped a certain website and got all the classes for a specific year; so all the insert statements are automated. I was told by a professor that there's a way to export all that data as INSERT statements. Is that true? If so how do I go about that?
Asked
Active
Viewed 4,695 times
-1
-
This might help: http://stackoverflow.com/questions/2857989/using-pg-dump-to-only-get-insert-statements-from-one-table-within-database – Felix Pamittan Apr 18 '16 at 01:49
-
Look for documentation on `pgdump` – aa333 Apr 18 '16 at 01:50
-
yeah but the pg_dump command isn't recognized in my pgAdmin...For some odd reason. – M. Barbieri Apr 18 '16 at 02:06
2 Answers
4
In pgAdmin, select the Backup
option on a database/schema/table, then check the Insert commands
checkbox in the dialogue.

Anthony Drogon
- 1,704
- 1
- 17
- 24
-
I'm not seeing any checkbox that says Insert commands. And when I try to back it up as is, I get a collection of strange characters... – M. Barbieri Apr 18 '16 at 02:23
-
You were right, but I have to put the format to "Plain" and there is no "Insert commands" option, I believe it is "Use Insert Commands" – M. Barbieri Apr 18 '16 at 02:34
1
Right click on a table and select "backup". The popup will show various options, including "Format", select "plain" and you get plain SQL. Then you can navigate to "Dump options #2"and check the "Use Insert commands"

M. Barbieri
- 512
- 2
- 13
- 27