How do Postgres create a file to populate a bank?

2

I have a database in POSTGRESQL populated, wanted to know if a command exists

SQL that returns a string that has the following command for all existing tables:

INSERT INTO aluno(id , nome, idade ) values(1,'Raul',23)

I wanted to do this to populate another bank that has data similar to the old bank, but has new tables!

    
asked by anonymous 15.05.2017 / 14:46

2 answers

3

To generate the commands insert of the data it contains in the database you can do the following:

Select Plain format

OntheDumpOptionstab1,select"Data"

OntheDumpOptions2tab,select"User Insert Commands"

IsuggestusingNotepad++toopen

    
15.05.2017 / 15:01
0

Use the pg_dump utility:

link

    
19.05.2017 / 23:31