Postgresql add dblink

 Open pgAdminIII Query window, execute SQL:

create extension dblink;

and create dblink extension(default no), then can see the dblink

Now, query other db data, use command:

 dblink(text,text), the first param is outside db link info, the second param is execute sql.

In other words, can firstly build the db link, and execute dblink(sql).

Time is going......
原文地址:https://www.cnblogs.com/shua/p/4365921.html