I have the following situation:
DB1: Database_new (table "phone") DB2: Database_old (table "mobile_phone")
Is there a way to transfer all the data from the table phone (DB1) to the table mobile_phone on DB2? The format is the same on both tables, let's not worry on the format or the datatype. All entries of the table of DB1 has to be transfered to the destination table on DB2.
I was thinking about stored procedures? maybe?
If there is a way please let me know it, I'd be very thankful!
In addition to pg_dump/pg_restore suggestion you could use a Foreign Data Wrapper(FDW) to transfer data. For more information see:
https://www.postgresql.org/docs/current/postgres-fdw.html
The above allows you to do cross database access within a Postgres cluster/instance or between instances.