insert value from two databases in postgresql
<p>Can I perform a </p>

<pre><code>select dblink_exec ('merg',E'insert into table1(col1,col2) select * from dblink(\'mc\',\'select distinct col1, col2 from table2\') as t(col1 bigint, col2 text)');
</code></pre>

<p>to be able to insert a select from a different database on the same server ?</p>

<p>I also tried to execute the second part into a view and then select from the view but did not work</p>