Re: Re: Accessing other databases with DBLink when leaving user/password empty

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Hermann Muster <Hermann(dot)Muster(at)gmx(dot)de>
Subject: Re: Re: Accessing other databases with DBLink when leaving user/password empty
Date: 2008-06-10 14:16:43
Message-ID: 200806100716.43613.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 10 June 2008 12:41 am, Hermann Muster wrote:

>
> Adrian Klaver wrote:
> > On Friday 06 June 2008 2:32 am, Hermann Muster wrote:
> >> 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-DbLi
> >>>nk -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');
> >
> > From the documentation:
> > http://www.postgresql.org/docs/current/static/dblink.html
> > Don't do the above.
> >
> >>> select * from dblink('1512','select "Vorname", "Name" from
> >>> "PERSONEN"')
> >>> AS (Vorname text, Name text);
> >
> > Here do:
> > select * from dblink('dbname=Test','select "Vorname", "Name" from
> > "PERSONEN"')
> > AS (Vorname text, Name text);
> Hi Adrian,
>
> I tried what you suggested, but still get the following Error:
> "Error connecting to the server: fe_sendauth: no password supplied"
>
> What is it I'm doing wrong? Isn't it possible to leave the password
> empty so that PostgreSQL can retrieve it from the current account?
>

Try setting up a .pgpass file. See documentation below:
http://www.postgresql.org/docs/8.3/interactive/libpq-pgpass.html

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message laser 2008-06-10 14:19:12 Re: Multithreaded queue in PgSQL
Previous Message Leif B. Kristensen 2008-06-10 14:10:58 Re: REGEXP_REPLACE woes