title: PostgreSQL copy/transfer data from one database to another
body: <p>I need to copy data from one table to another. the two tables have almost the same structure, but are in different databases.</p>
  
  <p>i tried</p>
  
  <pre><code>INSERT INTO db1.public.table2(
    id,
    name,
    adress,
    lat,
    lng
  )
  SELECT
    id,
    name,
    adress,
    lat
    lng
  FROM db2.public.table2;
  </code></pre>
  
  <p>wenn i try this, i get error cross database ... not implemented</p>