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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Re: Accessing other databases with DBLink when leaving user/password empty
Дата
Msg-id 200806100716.43613.aklaver@comcast.net
обсуждение исходный текст
Ответ на Re: Accessing other databases with DBLink when leaving user/password empty  (Hermann Muster <Hermann.Muster@gmx.de>)
Список 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@comcast.net

В списке pgsql-general по дате отправления:

Предыдущее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: REGEXP_REPLACE woes
Следующее
От: laser
Дата:
Сообщение: Re: Multithreaded queue in PgSQL