2022年10月17日(月) 16:36 Rama Krishnan <raghuldrag@xxxxxxxxx>: > > Hi all, > > What Is the difference between dblink and foreign data wrapper? Basically, dblink enables you to execute individual queries on a remote PostgreSQL server via a function and use the results in a local query e.g.: SELECT * FROM dblink('myconn', 'SELECT aid, bid, abalance FROM pgbench_accounts ORDER BY 1') whereas a foreign data wrapper enables you to query relations on a remote server (which can also be a data source other than PostgreSQL) directly within the local query. Regards Ian Barwick