Обсуждение: Facing authentication error on postgres 9.2 -> dblink functions

Поиск
Список
Период
Сортировка

Facing authentication error on postgres 9.2 -> dblink functions

От
Dev Kumkar
Дата:
Hello Everyone,

I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows:

    SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')

    ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user "NETWORK SERVICE"

What this error is related to? Do I need to modify pg_hba.conf file by any chance?

Thanks..

Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions

От
Albe Laurenz
Дата:
Dev Kumkar wrote:
> I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to
> execute dblink_connect as follows:
>
>     SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')
>
>     ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user
> "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by any chance?

You should specify a user=username option in the connection string,
otherwise that defaults to your operating system user name.

Yours,
Laurenz Albe


Re: [HACKERS] Facing authentication error on postgres 9.2 -> dblink functions

От
Andrew Dunstan
Дата:
On 02/06/2013 08:09 AM, Dev Kumkar wrote:
> Hello Everyone,
>
> I am using postgres 9.2 and when executing function dblink facing a
> fatal error while trying to execute dblink_connect as follows:
>
> /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
> dbname=postgres password=test')/
>
> *ERROR*: could not establish connection DETAIL: FATAL: password
> authentication failed for user "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by
> any chance?
>
> Thanks..
>


Do NOT send questions to multiple lists. That is a waste of everybody's
time. So do NOT follow up this email. This question belongs on
pgsql-general. If you have further questions pleease ask there.

The short answer is that you need to provide the user name in your
connect string.

cheers

andrew