I want to copy a table from one database into the other one.
I found this
Code:
SELECT * INTO new_table_name [IN externaldatabase] FROM old_tablename
Myproblem is how to reference externaldatabase I tried with "database2.schemat2.new_table_name" but it did not work. database2 runs at the same server as database1 containing old_table_name so the user, password, port, host is the same for both databases.
Is there any other way to do this (except pg_dump)?
Thanks