Re: Accessing other databases with DBLink when leaving user/password empty - Mailing list pgsql-general

From Hermann Muster
Subject Re: Accessing other databases with DBLink when leaving user/password empty
Date
Msg-id g2b09l$2jv4$1@news.hub.org
Whole thread Raw
In response to Accessing other databases with DBLink when leaving user/password empty  (Hermann Muster <Hermann.Muster@gmx.de>)
Responses Re: Re: Accessing other databases with DBLink when leaving user/password empty  (Adrian Klaver <aklaver@comcast.net>)
List pgsql-general
Does no one have any idea about that?

Regards.



Hermann Muster wrote:
> Hi,
>
> I have the following problem when trying to access other PostgreSQL
> databases with DBLink. I followed the instructions on
>
http://www.postgresonline.com/journal/index.php?/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html.

>
>
> My query to get access to another database on the same server looks like
> this:
>
>     select dblink_connect('1512','host=127.0.0.1 port=5432
>     dbname=Test user=postgres password=postgres');
>
>     select * from dblink('1512','select "Vorname", "Name" from
>     "PERSONEN"')
>     AS (Vorname text, Name text);
>
> The question is if it is possible to leave the 'user' and 'password'
> empty, so that these are taken from the account I'm currently using, as
> described below (taken from the above article).
>
>     [...]
>     Below is an example of querying a database on the same server
>     and cluster using DbLink. Note if no username and password is
>     specified, then DbLink connects with whatever account you are
>     currently using.
>
> It is not possible to connect to the other database when they are empty
> and it seems that DBLink can't get them from the currently used account.
> Can you please help me with that? Thank you.
>
> Regards,
> H. Muster

pgsql-general by date:

Previous
From: Tomasz Ostrowski
Date:
Subject: Re: Temporary Tables and Web Application
Next
From: Tim Tassonis
Date:
Subject: Re: Temporary Tables and Web Application