pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Julie Nishimura <juliezain@hotmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: existing dblinks
Date: Tue, 22 Oct 2019 08:27:13 -0700
Message-ID: <75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com> (raw)
In-Reply-To: <BYAPR08MB50144212991F97138E0D978EAC690@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB50144212991F97138E0D978EAC690@BYAPR08MB5014.namprd08.prod.outlook.com>

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





view thread (2+ messages)

Message-ID: <75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com>
Permalink:  ../75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com/
Also on:    postgresql.org/message-id/75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, juliezain@hotmail.com
  Subject: Re: existing dblinks
  In-Reply-To: <75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com>
  References: <BYAPR08MB50144212991F97138E0D978EAC690@BYAPR08MB5014.namprd08.prod.outlook.com> <75f8b0e6-a6bb-afa6-9cf2-fbede72d531d@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox