Re: existing dblinks - Mailing list pgsql-general

From Adrian Klaver
Subject Re: existing dblinks
Date
Msg-id 75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com
Whole thread Raw
In response to existing dblinks  (Julie Nishimura <juliezain@hotmail.com>)
List 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.klaver@aklaver.com



pgsql-general by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: Having more than one constraint trigger on a table
Next
From: Chris Morris
Date:
Subject: Lookup Primary Key of Foreign Server's Table