-1

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?

M. Barbieri
  • 512
  • 2
  • 13
  • 27

2 Answers2

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