Re: existing dblinks

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Julie Nishimura <juliezain(at)hotmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: existing dblinks
Date: 2019-10-22 15:27:13
Message-ID: 75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/21/19 3:26 PM, Julie Nishimura wrote:
> Hello, is there any way to find if there are any dblink exist on the 9.6
> postgresql server?

Are looking for whether the extension was installed?

If so then in psql:

\dx

will tell you.

Or are you looking for code that uses dblink?

AFAIK dblink creates connections on demand not from information in a
persistent store. So there is no table you can query to get the
information. You would have to search your code(internal and external)
for references to it.

If there are open connections you can use:

https://www.postgresql.org/docs/11/contrib-dblink-get-connections.html

dblink_get_connections — returns the names of all open named dblink
connections

>
> Thanks

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Morris 2019-10-22 16:16:05 Lookup Primary Key of Foreign Server's Table
Previous Message Andreas Joseph Krogh 2019-10-22 15:26:57 Re: Having more than one constraint trigger on a table