postgreSQL Inserting multiple rows
You can insert multiple rows in the database at the same time:
Insert from select
You can insert data in a table as the result of a select statement:
Note that the projection of the select must match the columns required for the insert. In this case, the tmp_person table has the same columns as person.