existing dblinks

Started by Julie Nishimuraover 6 years ago2 messagesgeneral
Jump to latest
#1Julie Nishimura
juliezain@hotmail.com

Hello, is there any way to find if there are any dblink exist on the 9.6 postgresql server?

Thanks

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Julie Nishimura (#1)
Re: existing dblinks

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