Re: About foreign data wrapper

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Rama Krishnan <raghuldrag(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: About foreign data wrapper
Date: 2022-10-17 13:22:08
Message-ID: CAB8KJ=j_90z+coWSBu3+1tEatvsWkGsqX6xsuYxcrWPCgQb02w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2022年10月17日(月) 16:36 Rama Krishnan <raghuldrag(at)gmail(dot)com>:
>
> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jacktby 2022-10-17 14:07:02 could not find shared library for Python
Previous Message Kieran McCusker 2022-10-17 12:33:39 Fedora 37